subject

Subtraction + Decision and Loop This is a twist on the previous exercise that will help you review loops and decision structures. You will again ask the user to enter two numbers. However, you will ALWAYS subtract the smaller number from the larger number to ensure that you never get a negative number for an answer. You do this by checking the numbers and switching them if they are not in the right order (larger then smaller). All of this checking, switching, subtracting, and output of the answer should occur in a function.
((( THIS WAS THE PREVIOUS EXERCISE
Function Basics - Arguments and Parameters
This is another easy exercise to test your knowledge of the fundamentals. In main(), ask the user to enter two integers. Pass those two integers to a function that will subtract one number from another. This function must also output the answer to the user.
Output:
Enter two integers (separated by a space) and this program will subtract them: [user enters: 5 7]
5 - 7 = -2
Notes and Hints:
1) From now on, you must use a function prototype for all programs that use functions. Don't expect me to ask for it in each exercise. )))
Finally, ask the user if they would like to run the program again. By now, you should know exactly what type of loop to use.
Output:
Enter two integers (separated by a space) and this program will subtract the smaller from the larger: [user enters: 7 5]
7 - 5 = 2
Do you want to run this program again? [user enters: y]
Enter two integers (separated by a space) and this program will subtract the smaller from the larger: [user enters: 5 7]
7 - 5 = 2
Do you want to run this program again? [user enters: n]
Notes and Hints:
1) As always, make sure you accept an upper or lower case 'Y'

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
question
Computers and Technology, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
question
Computers and Technology, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
You know the right answer?
Subtraction + Decision and Loop This is a twist on the previous exercise that will help you review...
Questions
question
Mathematics, 22.11.2019 21:31
Questions on the website: 13722367