A program to display the first 10 odd numbers.

 

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a=1,i=0;

while(i<10)
{
cout<<a<<"\n";
a=a+2;
i++;
}

getch();
}

 

< Back