Question: 1. Write a C++ program USING WHILE (LOOP) STATEMENT that reads in a number n and outputs the sum of the squares of the
1. Write a C++ program USING WHILE (LOOP) STATEMENT that reads in a number n and outputs the sum of the squares of the numbers from 1 to n. Example: if n = 3, then display 14 because 12 +22+ 3 = 14 2. Write a C++ program USING SWITCH-CASE STATEMENT that asks for the start month and end month and compute for the total number of days from the start month to the end month. Example: if start month = 2 and end month = 5, then Total = 28 +31+30 +31 =120. Display 120. 3. Write a C++ program USING WHILE (LOOP) STATEMENT that reads in n numbers. The numbers will be alternatively added and subtracted. Example: if n = 5 and the numbers entered are 4, 14, 5, 6, 1 Then compute for 4+14-5+6-1=18. Then display 18.
Step by Step Solution
3.45 Rating (142 Votes )
There are 3 Steps involved in it
Screensho... View full answer
Get step-by-step solutions from verified subject matter experts
