Home C C++ Java Python Perl PHP SQL JavaScript Linux Online Test

Home » C » Solved Programs » Find square of any number

C program to find square of any number using function

#include<stdio.h>

int func(int);

int main()
{
int no, square;

printf("\n Enter an no : ");
scanf("%d",&no);

square = func(no);

printf("\n Square of no is : %d ", square);

}

int func(int temp)
{
return temp*temp;
}