I want to download full encyclopedia program, please help.

Please help me! I want a menu driven program in c?

  • respected people who are reading this please help me.i want a to submit a project on c which is a menu driven program for an ice cream parlor . please someone provide me the source code for it .i need file handling in it. if any programmer is reading this please mail me the source code on [email protected]'ll be really very very thankful to you .this is urgent. please

  • Answer:

    You have not said what type of menu, or what options, you want for the ice cream parlor. Anyhow, here is some code, that you could add to if you need more menu items, etc. int cone_selection; printf("Welcome to the ice cream parlor\n"); do { printf("Please enter a number from the menu below\n"); printf("1 - Single cone\n"); printf("2 - Double cone\n"); printf("3 - Nothing\n"); scanf("%d", &cone_selection); } while (cone_selection < 1 || cone_selection > 3); if (cone_selection == 3) { printf("Thank you for visiting"); return 0; } char cone_string[20]; if (cone_selection == 1) { cone_string = "single cone"; } else { cone_string = "double cone"; } int flavor_selection; do { printf("What flavor would you like?\n"); printf("1 - Vanilla\n"); printf("2 - Chocolate\n"); printf("3 - Strawberry\n"); printf("4 - Bubble Gum\n"); printf("5 - No flavor\n"); scanf("%d", flavor_selection); } while (flavor_selection < 1 || flavor_selection > 5); if (flavor_selection == 5) { printf("Thank you for visiting"); return 0; } char flavor_string[20]; switch (flavor_selection) { case 1 : flavor_string = "vanilla"; break; case 2 : flavor_string = "chocolate"; break; case 3 : flavor_string = "strawberry"; break; case 4 : flavor_string = "bubble gum"; break; } printf("You chose a %s with %s flavor", cone_string, flavor_string); return 0; Hope that helps.

Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

If you want a menu driven program might be better to go for some other language like php or java. You might be able to build a simple UI as well. Coming back to your question Here is how you generally approach for a menu driven program in c Display a list of options with the numbers before them ask user to enter the choice clear the screen present what you want to present and show the menu back again always have an exit option When i searched google for "c menu driven program" the first link had some source code and looks good to start. .../

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.