Thread: create menu with do while loop advice pls

  1. #1
    Registered User
    Join Date
    Apr 2006

    create menu with do while loop advice pls


    i have a problem. I'm trying to produce a menu which will do 3 things.

    1. Add book
    2. delete book
    3. list book

    now the teacher has given me this and i have to produce this menu using a do while loop and have to use the following methods.

    basically i am thinking about using CASE to do this but how do i implement it with a do while loop?

    I'm not asking anyone to do my homework, but need some advice on how to implement a case with a do while loop or should i use something different?


  2. #2
    Registered User
    Join Date
    Jan 2005
    You can just put the switch inside the do while loop block. Pretend you are displaying the menu only once, and then figure out how you would write the code for the switch. Then, place all that code inside a do while and fix the loop so that it shows the menu over and over.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 12-01-2008, 10:09 AM
  2. Please help create a loop for embedded SQL
    By cjohnman in forum C Programming
    Replies: 4
    Last Post: 04-24-2008, 06:46 AM
  3. for loop or while loop
    By slamit93 in forum C++ Programming
    Replies: 3
    Last Post: 05-07-2002, 04:13 AM
  4. for loop to create an array of objects
    By Shadow12345 in forum C++ Programming
    Replies: 9
    Last Post: 05-03-2002, 06:26 PM
  5. Help me in while loop with case menu
    By playboy1620 in forum C Programming
    Replies: 1
    Last Post: 02-20-2002, 11:07 PM