Question: show step Write a C++ program which takes an input (i.c. a positive number) from user and prints the total from 1 to user input.

show step show step Write a C++ program which takes an input (i.c. a

Write a C++ program which takes an input (i.c. a positive number) from user and prints the total from 1 to user input. For example, if the user enter 10, the program first adds 1+2+...+ 10 and prints the total. It also prints if the total is even or odd number. The program should continue as long the user chooses to. Extra credit - If the total is a prime number, print a special message saying the totalis prime

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!