Question: C++ Program 1. Write a program that determines the SUM of N positive numbers, starting from 1 to the number N. The program shall ask
1. Write a program that determines the SUM of N positive numbers, starting from 1 to the number N. The program shall ask the user what will be the number nth that you want fin the sum to; and find sum of all numbers to that value. You need use For Loop. (for example if the user said 5 then the program will calculate 1+2+3+4+5 ) and give the results as Sum of Positive numbers from 1 to 5 is: 15). 2. Write a program that use FUNCTION called calculate Volume(length, width, height) which receives three parameters, length, width, and height of a rectangular cube and return the volume. The volume of a rectangular cube is calculated by multiplying length times width times height. And print the results. The user will give the length and the width and the height thru key board input and the results shall be written as (as example) For a cube of length = 5 and width = 3 and height = 4 the volume is : 60 inch-cube The program shall ask the user if he/she wants to continue if answer is Y (for yes) will loop if the answer is N (for No) will end. In a- while statement)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
