Question: Write C + + Program to check whether a number is prime number or not. ( A prime number is only divisible by 1 and

Write C++ Program to check whether a number is prime number or not. (A prime number is only
divisible by 1 and itself without leaving a remainder)
Write C++ program to find sum of series 1??2+3??2+5??2+dots..+n???2.
Write C++ Program to do arithmetic operations according to user choice using switch case.
Write C++ program to calculate area of a circle, a rectangle or a triangle depending upon user's
choice.
Rewrite the following loops as for loops.
a. int i=1;
while (i10)
{
if i 2
cout 'X';
i++;
}
b. int i=1;
while (i10)
152 Chapter 3/ More Flow of Control
{
cout 'x';
i=i+3;
}
c. long m=100;
do
{
cout ''X';
m=m+100;
} while (m1000);
 Write C++ Program to check whether a number is prime number

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!