Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

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);
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions