Do-While Program in C/C++ to print all even numbers from 1-50

Do-While Program in C/C++ to print all even numbers from 1-50


This is a Do-While Program in C/C++ to print all even numbers from 1-50.


#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
int main()
{
int num=0;
do{
cout << num << "\t";
num=num+2;
}
while(num<=50);
}

Comments

Popular posts from this blog

Book-Shop Program using C++

Nesting of For Loop in C/C++

Switch statement in C/C++