Question: Write a C++ program which takes an input from user and prints the total from 1 to user input. For example, if the user enter
Write a C++ program which takes an input 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 total is prime
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
