How to print table of 1st 10 natural numbers
/*Program to print table of 1st 10 natural numbers*/
#include<stdio.h>
#include<conio.h>
//main function
void main ()
{
int i,j;
clrscr();
//first for loop for incrementing number
for(i=1;i<11;i++)
{ //second for loop for printing the table of individual number
for(j=1;j<11;j++)
printf("%4d",i*j);
printf("\n");
}
getch();
}
0 comments: