Breaking

square of number



#include<stdio.h>
#include<stdlib.h>
void main()
{

   int i, a, b;
   printf("Enter a end number  ") ;
   scanf (" %d", &a) ;

    for(i=1; i<=a; i++)
    {      b=1;
            b=i*i;
            printf(" The square of %d is =%d",b) ;
    }
}
     

Simple Output:
enter the end number : 4
the square of 1 is =1
the square of 2 is =4
the square of 3 is =9
the square of 4 is =16