Restaurant Menu Project

#include <stdio.h> int main() { int choice; printf("Choose one of the following:\n"); printf("1. BYTE\n2. STRING cheese\n3. DOUBLE cheeseburger\n"); scanf("%d", &choice); if(choice == 1) printf("You have ordered the BYTE\n"); else if (choice == 2) printf("You have ordered the STRING cheese\n"); else if (choice ==3) printf("You have ordered the DOUBLE cheeseburger\n"); else printf("We don't have have that in stock"); return 0; }
The code above first includes the standard input/output library <stdio.h> to use the input/output functions. The code then presents the user with a choice. The "printf" statement describes 3 options the user can choose: BYTE, STRING, and DOUBLE. The "scanf" reads the user's input and then stores it in the integer choice. The program then checks the user's choice using a series of if-else statements and displays a corresponding message based on the selected option. If the user enters an invalid option, it prints an error message