A program to display the first 10 odd numbers, using for loop.

 

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
int i,a=1;

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

getch();
}

 

< Back