Write a C++ program to shown 20 even number of while using do-while loop?

2 Answers

Tanmoy Mistri Profile
Tanmoy Mistri answered
You're question is not clear.Well here's a sample program that'll print even numbers between 1 and 20.

#include<iostream.h>
void main()
{
int I=1;
cout<<"Even numbers between 1 and 20n";
do{
if(I%2==0)
cout<<I<<"n";
I++;
}while(I<=20) ;
}

Answer Question

Anonymous