for loop in C.

 

01 #include<stdio.h>
02
03 int main()
04 {
05 int i;
06 for(i=1; i<=10; i++)
07 {
08 printf("nSquare of %d is %d",i,i*i);
09 }
10 return 0;
11 }
 
 
OUTPUT :

Square of 1 is 1
Square of 2 is 4
Square of 3 is 9
Square of 4 is 16
Square of 5 is 25
Square of 6 is 36
Square of 7 is 49
Square of 8 is 64
Square of 9 is 81
Square of 10 is 100

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *