Casel: Write a menu driven program that allows you to visit cities of man in random order with following options. 1: Visit a city 2: Go to previous city 3: Quit the program When user presses 1: program asks user to enter the city name, and then display that the city has been visited. Please note user can visit a city any number of times When user presses 2: Program takes you back to the previous city When user presses 3: Program terminates See the below example how program interacts with the user: C:> 1: Visit a city program Enter your choice 2: Go to previous city 3: Quit the Please enter a city to visit. Muscat You are in Muscat now. Enter your choice. 1: Visit a city 2: Go to previous city Please enter a city to visit. Ibra You are in Ibra noW. Enter your choice. 1: Visit a city 2: Go to previous city Please enter a city to visit. Sohar You are in Sohar now. Enter your choice. 1: Visit a city 2 You are in Ibra now. 2: Go to previous city Enter your choice. 1: Visit a city 2: Go to previous city Please enter a city to visit. Nizwa You are in Nizwa noW. Enter your choice. 1: Visit a city 2 You are in Ibra now.. 2: Go to previous city Enter your choice. 1: Visit a city 2 2: Go to previous city You are in Muscat now. Enter your choice. 1• Visit a city 2 2: Go to previous city You are back to your original place. Enter your choice…. 1: Visit a city 3 Program terminates. 2: Go to previous city 3: Quit the program 3: Quit the program 3: Ouit the program 3: Quit the program 3: Quit the program 3: Ouit the program 3: Ouit the program 3: Quit the program

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Casel: Write a menu driven program that allows you to visit cities of
man in random order with following options.
1: Visit a city
2: Go to previous city
3: Quit the
program
When user presses 1: program asks user to enter the city name, and
then display that the city has been visited. Please note user can visit a
city any number of times
When user presses 2: Program takes you back to the previous city
When user presses 3: Program terminates
See the below example how program interacts with the user:
C:> 1: Visit a city
program
Enter your choice
2: Go to previous city
3: Quit the
Please enter a city to visit.
Muscat
You are in Muscat now.
Enter your choice.
1: Visit a city
2: Go to previous city
Please enter a city to visit.
Ibra
You are in Ibra noW.
Enter your choice.
1: Visit a city
2: Go to previous city
Please enter a city to visit.
Sohar
You are in Sohar now.
Enter your choice.
1: Visit a city
2
You are in Ibra now.
2: Go to previous city
Enter your choice.
1: Visit a city
2: Go to previous city
Please enter a city to visit.
Nizwa
You are in Nizwa noW.
Enter your choice.
1: Visit a city
2
You are in Ibra now..
2: Go to previous city
Enter your choice.
1: Visit a city
2
2: Go to previous city
You are in Muscat now.
Enter your choice.
1• Visit a city
2
2: Go to previous city
You are back to your original place.
Enter your choice….
1: Visit a city
3
Program terminates.
2: Go to previous city
3: Quit the program
3: Quit the program
3: Ouit the program
3: Quit the program
3: Quit the program
3: Ouit the program
3: Ouit the program
3: Quit the program

Casel: Write a menu driven program that allows you to visit cities of
oman in random order with following options.
1: Visit a city
2: Go to previous city
3: Quit the
program
When user presses 1: program asks user to enter the city name, and
then display that the city has been visited. Please note user can visit a
city any number of times
When user presses 2: Program takes you back to the previous city
When user presses 3: Program terminates
See the below example how program interacts with the user:
C:> 1: Visit a city
2: Go to previous city
3: Quit the
program
Enter your choice...
1
Please enter a city to visit..
Muscat
You are in Muscat now...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
1
Please enter a city to visit..
Ibra
You are in Ibra now...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
1
Please enter a city to visit..
Sohar
You are in Sohar now...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
2
You are in Ibra now...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
1
Please enter a city to visit..
Nizwa
You are in Nizwa now...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
2
You are in Ibra now...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
2
You are in Muscat now...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
You are back to your original place...
Enter your choice...
1: Visit a city
2: Go to previous city
3: Quit the program
3
Program terminates...
Transcribed Image Text:Casel: Write a menu driven program that allows you to visit cities of oman in random order with following options. 1: Visit a city 2: Go to previous city 3: Quit the program When user presses 1: program asks user to enter the city name, and then display that the city has been visited. Please note user can visit a city any number of times When user presses 2: Program takes you back to the previous city When user presses 3: Program terminates See the below example how program interacts with the user: C:> 1: Visit a city 2: Go to previous city 3: Quit the program Enter your choice... 1 Please enter a city to visit.. Muscat You are in Muscat now... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program 1 Please enter a city to visit.. Ibra You are in Ibra now... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program 1 Please enter a city to visit.. Sohar You are in Sohar now... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program 2 You are in Ibra now... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program 1 Please enter a city to visit.. Nizwa You are in Nizwa now... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program 2 You are in Ibra now... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program 2 You are in Muscat now... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program You are back to your original place... Enter your choice... 1: Visit a city 2: Go to previous city 3: Quit the program 3 Program terminates...
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education