Complete a program that allows the user to choose addition or subtraction operations on two numbers entered from the keyboard. Code getChoice as a function that returns choice, addition and subtraction as functions that accept the two numbers as parameters and return the results of the calculations, and displayResult as a void function that accepts the result as a parameter. Be sure to put your name as a comment at the beginning of your code and at the end as the programmer.
Complete a program that allows the user to choose addition or subtraction operations on two numbers entered from the keyboard. Code getChoice as a function that returns choice, addition and subtraction as functions that accept the two numbers as parameters and return the results of the calculations, and displayResult as a void function that accepts the result as a parameter. Be sure to put your name as a comment at the beginning of your code and at the end as the programmer.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter1: Fundamentals Of C++ Programming
Section1.3: Preliminary Three: Software Development
Problem 7E: (Statistics) This is the formula for the standard normal deviate, z, used in statistical...
Related questions
Question
C++ beginner
![HOMEWORK #6 PART 1
Please enter 1 if you want to add two numbers
enter 2 if you want to subtract two numbers 2
Please enter two numbers 4.65 9.2
The result is -4.55
Programmer: insert your name here](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F97c87b2f-eecc-421b-9599-27d468e13931%2Fa618b28f-0329-400f-8d6f-f01871b04739%2Fsukftm8_processed.png&w=3840&q=75)
Transcribed Image Text:HOMEWORK #6 PART 1
Please enter 1 if you want to add two numbers
enter 2 if you want to subtract two numbers 2
Please enter two numbers 4.65 9.2
The result is -4.55
Programmer: insert your name here
![HOMEWORK 6 PART 1
Planning - Flow Charts
Date Due: Wednesday, April 14, 2021 at 11:59pm
addition
subtraction
getChoice
Complete a program that allows the user to choose addition or subtraction
operations on two numbers entered from the keyboard. Code getChoice as a
function that returns choice, addition and subtraction as functions that accept the
two numbers as parameters and return the results of the calculations, and
displayResult as a void function that accepts the result as a parameter. Be sure to
put your name as a comment at the beginning of your code and at the end as the
(num1, num2)
(num1, num2)
Ask user for
Result =
Result =
choice of
operation
num1+num2
num1-num2
programmer.
Input
Process
Output
1. Choice of
1. If choose to perform
1. Result of operation
Input
operation
2. First number
operation, add two
numbers; otherwise,
Return
Return
choice
(result)
(result)
3. Second number
subtract two numbers
main
Planning
- Breaking Program to Smaller Pieces
Return
Print
(choice)
title
getChoice
Main
displayResult
(result)
Get 2 numbers
Input
Process
Output
Choice is add
Display
subtraction
addition
result
getChoice
getNumbers
addition
subtraction
displayResult
displayResult
Return
Display name
end](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F97c87b2f-eecc-421b-9599-27d468e13931%2Fa618b28f-0329-400f-8d6f-f01871b04739%2Fj2t7r1e_processed.png&w=3840&q=75)
Transcribed Image Text:HOMEWORK 6 PART 1
Planning - Flow Charts
Date Due: Wednesday, April 14, 2021 at 11:59pm
addition
subtraction
getChoice
Complete a program that allows the user to choose addition or subtraction
operations on two numbers entered from the keyboard. Code getChoice as a
function that returns choice, addition and subtraction as functions that accept the
two numbers as parameters and return the results of the calculations, and
displayResult as a void function that accepts the result as a parameter. Be sure to
put your name as a comment at the beginning of your code and at the end as the
(num1, num2)
(num1, num2)
Ask user for
Result =
Result =
choice of
operation
num1+num2
num1-num2
programmer.
Input
Process
Output
1. Choice of
1. If choose to perform
1. Result of operation
Input
operation
2. First number
operation, add two
numbers; otherwise,
Return
Return
choice
(result)
(result)
3. Second number
subtract two numbers
main
Planning
- Breaking Program to Smaller Pieces
Return
Print
(choice)
title
getChoice
Main
displayResult
(result)
Get 2 numbers
Input
Process
Output
Choice is add
Display
subtraction
addition
result
getChoice
getNumbers
addition
subtraction
displayResult
displayResult
Return
Display name
end
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage