Friday, 22 May 2015

How to print numbers from 1-10 in for loop in c++

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

void main()
{
 clrscr();
 cout<<"Number 1-10 are!";

 for(int i=1; i<=10; i++)
 cout<<"\n"<<i;

 getch();

}



Coding Format

Output Format

No comments:

Post a Comment