Saturday, 5 September 2020

Program to calculate area of the rectangle

  /* Program to calculate area of rectangle*/

#include<stdio.h>

int main()
{
int Area,Length,Breadth;
Length=20;
Breadth=10;
Area=Length*Breadth;
printf("The area is %d", Area);




return 0;
}

Output:

The area is 200

Description:

Here the value of the length and breadth of the rectangle is given directly,so we applied formula and  get the output result.

1 comment:

If you have any doubt, please ask in the comment section.

Search This Blog

Program to print weather the number is happy or not.

#include <stdio.h> #include <math.h> int main () { int i , j , num , temp , sum = 0 ; printf ( "Enter number\n...