Command Line Calculator   The program will ask the user to select a function from 1-5 (1-Add, 2-Subtract, 3-Multiply, 4- Divide, 5-Exit the program). Afterwards, the program asks for two inputs from the user and prints out the result of the two numbers given which operation the user selected.   After printing the result, loop back to asking the user to select a function again until he enters 5 to exit the program. Try to complete this task using methods for each function and using loops.   Please use IF and ELSE COMMAND.

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter11: User Interfaces, Visual Basic For Applications (vba), And Collaboration Features
Section: Chapter Questions
Problem 11AYK
icon
Related questions
Question

Command Line Calculator

 

The program will ask the user to select a function from 1-5 (1-Add, 2-Subtract, 3-Multiply, 4- Divide, 5-Exit the program). Afterwards, the program asks for two inputs from the user and prints out the result of the two numbers given which operation the user selected.

 

After printing the result, loop back to asking the user to select a function again until he enters 5 to exit the program. Try to complete this task using methods for each function and using loops.

 

Please use IF and ELSE COMMAND.

Please select from below choices:
1 - Add
2 - Subtract
3 - Nultiply
4 - Divide
5 Exit the program
Please enter your choice: 1
Enter first number: 44
Enter second number: 27
Result: 71
Please select from below choices:
2 - Subtract
3 - Multiply
4 - Divide
5 Exit the program
Please enter your choice:
Result: 8
Please select from below choices:
1 - Add
2 - Subtract
3- Multiply
4 - Divide
5 - Exit the program
Please enter your choice:
Will now exit the program.
Transcribed Image Text:Please select from below choices: 1 - Add 2 - Subtract 3 - Nultiply 4 - Divide 5 Exit the program Please enter your choice: 1 Enter first number: 44 Enter second number: 27 Result: 71 Please select from below choices: 2 - Subtract 3 - Multiply 4 - Divide 5 Exit the program Please enter your choice: Result: 8 Please select from below choices: 1 - Add 2 - Subtract 3- Multiply 4 - Divide 5 - Exit the program Please enter your choice: Will now exit the program.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
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
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage