Thursday, 19 June 2014

Write a program using for loop to print first 10 natural numbers





To print first 10 natural numbers Using for Loop





#include<iostream.h>

int main()
{
system("cls");
int i;
for(i=1;i<=10;i++)
{
cout<<i<<"\t";
}
return 0;
}






Output::


   1  2  3  4  5  6  7  8  9  10


No comments:

Post a Comment