C Program to Find Area of Rectangle

In this example, We are going to find Area of Rectangle in C.

The formula for calculating Area of any Rectangle is-

area = a * b

where a and is sides of rectangle

program to find area of rectangle

#include<stdio.h>
void main()
{
   int a,b,area;
   printf("Enter value for one side of Rectangle");
   scanf("%d",&a);
   printf("Enter value for other side of Rectangle");
   scanf("%d",&b);
   area = a * b;
   printf("Area of the Rectangle = %d",area);
}

Output

Enter value for one side of Rectangle
10
Enter value for other side of Rectangle
15
Area of the Rectangle = 150
Share in a Single Click

Leave a Reply

Your email address will not be published. Required fields are marked *