[ create a new paste ] login | about

Link: http://codepad.org/FWiXS6bJ    [ raw code | output | fork ]

C, pasted on Dec 7:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//Area of square(with arguments and with return value)
#include<stdio.h>
#include<conio.h>
int main()
{
	int a,c;
	printf("enter the length of square");
	scanf("%d",&a);
	c=area();
	printf("area of square is %d",c);
	getch();
}
area(int a)
{
	int c;
	c = a*a;
	return c;
}


Output:
1
Line 17: error: conio.h: No such file or directory


Create a new paste based on this one


Comments: