Casel: Write a menu driven program that allows you to visit cities ofman in random order with following options.1: Visit a city2: Go to previous city3: Quit theprogramWhen user presses 1: program asks user to enter the city name, andthen display that the city has been visited. Please note user can visit acity any number of timesWhen user presses 2: Program takes you back to the previous cityWhen user presses 3: Program terminatesSee the below example how program interacts with the user:C:> 1: Visit a cityprogramEnter your choice2: Go to previous city3: Quit thePlease enter a city to visit.MuscatYou are in Muscat now.Enter your choice.1: Visit a city2: Go to previous cityPlease enter a city to visit.IbraYou are in Ibra noW.Enter your choice.1: Visit a city2: Go to previous cityPlease enter a city to visit.SoharYou are in Sohar now.Enter your choice.1: Visit a city2You are in Ibra now.2: Go to previous cityEnter your choice.1: Visit a city2: Go to previous cityPlease enter a city to visit.NizwaYou are in Nizwa noW.Enter your choice.1: Visit a city2You are in Ibra now..2: Go to previous cityEnter your choice.1: Visit a city22: Go to previous cityYou are in Muscat now.Enter your choice.1• Visit a city22: Go to previous cityYou are back to your original place.Enter your choice….1: Visit a city3Program terminates.2: Go to previous city3: Quit the program3: Quit the program3: Ouit the program3: Quit the program3: Quit the program3: Ouit the program3: Ouit the program3: Quit the program
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here