C Program to find area of Rectangle

Get length and breadth of rectangle and find area of rectangle

Sample Input 1:

4 5

Sample Output 1:


Program or Solution


int main()

	int length,breadth, area;
	printf("Enter length and breadth of rectangle:");   
	scanf("%d %d",&length,&breadth);

	area=length * breadth;
	printf("\nArea of Rectangle: %d",area);
	return 0;


Program Explanation

Get length and breadth of a rectangle (using scanf statement)

Calculate area by multiplying length and breadth (area = length * breadth) print area (using printf statement)


This C coding is simple and easy to understandable. Very simple programming.