Question
all c++ programs #1 Code a program that will use a void function to find the volume of either sphere, cylinder, or pyramid (choose the
all c++ programs
#1 Code a program that will use a void function to find the volume of either sphere, cylinder, or pyramid (choose the one you want to code), calling parameters by reference when needed.
#2 Code a program that will find the minimum, maximum, and sum of two, three, and four variables (see Chapter 4 last slide for example). Use either double or int for the function types.
#3 Using a for loop, code a program that will allow the user to enter how much money he makes at his job (per month) and will allow him to enter the range of years he wants to forecast how much he will have made (example: if the user enters 950 per month, and wants a forecast between 2 and 3 years, the output should be: After 2 years, you will have made $22800. After 3 years, you will have made $34200.). The formula should be total income = monthly pay * 12 * years.
#4 For the problem above, change the code so that the years entered by the user is passed to a function to be outputted. The for loop should also be in the function.
*#5 Code a function that will sort three integer arguments from least to highest (or highest to least).
*#6 Code a function that will allow the user to enter a number, an operator (entered as a character), and then another number (example: 2-3). Then use the character to calculate the result for addition, subtraction, multiplication, and division. (example: 52+75 should output 127).
*#7 Modify the above program so that the calculation part of the program is done in separate functions. (example: if the user enters 10*3, the input function should call a multiplication function and output 30)
#8 Code a function that takes a number from the main and returns the sum of all multiples less than that number squared. (example: if the function receives 4, the function will return 24, which is 4 + 8 + 12)
#9 Code a function that takes a number and returns the amount of numbers that it is evenly divisible by. (example: if the function receives 6, the return is 4 because 6 is divisible by 1, 2, 3, and 6)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started