C Program to Calculate Square of a Number

C Program to Calculate Square of a Number

How to Calculate Square of a Number in C? We can do it by Multiplying the Number with itself OR by Powering it by 2 OR we can also do it by using Modules.

Square of a Number in C :



#include<stdio.h>
 
int main()
{
  int number,Square;
 
  printf("Please Enter a integer Value : \n ");
  scanf("%d", &number);
  
  Square = number * number;
  
  printf("Square of the number %d is: %d\n",number,Square);
 
  return 0;
}


Output :