This will be a menu-driven program. The menu should look like this: Menu ==== 1. Addition of non-negative numbers 2. Alphabetize strings 3. Еxit Enter your choice: If the user chooses #1 in the menu, your program should ask the user for 2 integers, then print them and their total. Keep doing this entire process until at least one of the numbers is negative. At that point, the program should print a message that at least one of the numbers is negative. Ex: if the user enters 13 and 2, the output would look like: You entered 13 and 2 Neither is negative Their total is 15 (and the loop should execute again) Ex: if the user enters 100 and -7, the output would look like: You entered 100 and -7 At least one is negative (notice no total is printed and the loop should NOT execute again) If the user chooses #2 in the menu, your program should ask the user for 2 lowercase strings (assume the user will enter lowercase strings) and tell which would come first alphabetically in the form shown in the examples. Keep doing this entire process until one of the strings is "stop". Ex: if the user enters “help" and “hello", the output would look like: 'hello' comes before 'help' alphabetically (and the loop should execute again) Ex: if the user enters "abcdefg" and “abcdefh", the output would look like: 'abcdefg' comes before 'abcdefh' alphabetically (and the loop should execute again) Ex: if the user enters “aaaaa" and "stop", the output would look like: Program is over (notice no comparison is printed and the loop should NOT execute again) Your program should continue to print the menu, get the user's choice, and print the results until the user enters #3 on the menu, at which time your program should print a short message telling the user the program is over, and the program ends.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Do it fast. Put up screenshot run code also

This will be a menu-driven program. The menu should look like this:
Menu
====
1. Addition of non-negative numbers
2. Alphabetize strings
3. Exit
Enter your choice:
If the user chooses #1 in the menu, your program should ask the user for 2 integers, then print them and
their total. Keep doing this entire process until at least one of the numbers is negative. At that point, the
program should print a message that at least one of the numbers is negative.
Ex: if the user enters 13 and 2, the output would look like:
You entered 13 and 2
Neither is negative
Their total is 15
(and the loop should execute again)
Ex: if the user enters 100 and -7, the output would look like:
You entered 100 and -7
At least one is negative
(notice no total is printed and the loop should NOT execute again)
If the user chooses #2 in the menu, your program should ask the user for 2 lowercase strings (assume
the user will enter lowercase strings) and tell which would come first alphabetically in
the form shown in the examples. Keep doing this entire process until one of the strings is "stop".
Ex: if the user enters “help" and “hello", the output would look like:
'hello'
comes before 'help' alphabetically
(and the loop should execute again)
Ex: if the user enters "abcdefg" and "abcdefh", the output would look like:
'abcdefg' comes before 'abcdefh' alphabetically
(and the loop should execute again)
Ex: if the user enters "aaaaa" and "stop", the output would look like:
Program is over
(notice no comparison is printed and the loop should NOT execute again)
Your program should continue to print the menu, get the user's choice, and print the results until the user
enters #3 on the menu, at which time your program should print a short message telling the user the
program is over, and the program ends.
Transcribed Image Text:This will be a menu-driven program. The menu should look like this: Menu ==== 1. Addition of non-negative numbers 2. Alphabetize strings 3. Exit Enter your choice: If the user chooses #1 in the menu, your program should ask the user for 2 integers, then print them and their total. Keep doing this entire process until at least one of the numbers is negative. At that point, the program should print a message that at least one of the numbers is negative. Ex: if the user enters 13 and 2, the output would look like: You entered 13 and 2 Neither is negative Their total is 15 (and the loop should execute again) Ex: if the user enters 100 and -7, the output would look like: You entered 100 and -7 At least one is negative (notice no total is printed and the loop should NOT execute again) If the user chooses #2 in the menu, your program should ask the user for 2 lowercase strings (assume the user will enter lowercase strings) and tell which would come first alphabetically in the form shown in the examples. Keep doing this entire process until one of the strings is "stop". Ex: if the user enters “help" and “hello", the output would look like: 'hello' comes before 'help' alphabetically (and the loop should execute again) Ex: if the user enters "abcdefg" and "abcdefh", the output would look like: 'abcdefg' comes before 'abcdefh' alphabetically (and the loop should execute again) Ex: if the user enters "aaaaa" and "stop", the output would look like: Program is over (notice no comparison is printed and the loop should NOT execute again) Your program should continue to print the menu, get the user's choice, and print the results until the user enters #3 on the menu, at which time your program should print a short message telling the user the program is over, and the program ends.
Expert Solution
steps

Step by step

Solved in 5 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY