Square of two number

Wednesday, 7 September 2011

#include<stdio.h>
#include<conio.h>
void main()
{
int sqr(int);
int num,s;
clrscr();
printf("Enter the number\n");
scanf("%d",&num);
s=sqr(num);
printf("num=%d\nSquare of number=%d\n",num,s);
getch();
}


int sqr(int x)
{
int t;
t=x*x;
return t;
}


OUTPUT:


Enter the number
5
num=5
Square of number=25







No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading