Problem
Write a C Program to calculate AREA of rectangle.
Solution
The source code for calculating the AREA of a rectangle in C is provided below.
#include<stdio.h> #include<conio.h> int main() { int l,b; int area; printf("Enter the length of the rectangle :: "); scanf("%d",&l); printf("\nEnter the breadth of the rectangle :: "); scanf("%d",&b); area=l*b; printf("\nThe area of a rectangle is %d \n",area); return 0; }
Leave a Reply