Question: Lab 4 PART 2 (Lab) a) Write a C++ program that will read in the integer N, and calculate: The summation: = 03+13+23++N3 b) Write

Lab 4 PART 2 (Lab)

a) Write a C++ program that will read in the integer N, and calculate:

The summation: = 03+13+23++N3

b) Write a program that asks the user to input the temperatures of (n) months of the year to monitor how the weather changes.

The program must calculate and print the highest, the lowest and the average of all temperatures.

Example: Please enter the number of months 4 Please enter the average temperature of each months 21 18 26 30 The highest temperature is: 30 The lowest temperature is: 18 The average is: 23.74

c) Write a program that reads an integer, and prints its factorial. Assume that the allowed integer value N is (0 < N < 13).

Output

The output contains an integer value corresponding to the factorial of N. Sample Inputs Sample Outputs 4 24 5 120 8 40320

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!