Computer Science, asked by dhaara6058, 1 year ago

Write a program to calculate the area of a rectangle. The program should get the length and breadth ; values from the user and print the area.

Answers

Answered by saranyaammu3
1

Answer:

#include<stdio.h>

#include<conio.h>

 

int main() {

  int length, breadth, area;

 

  printf("\nEnter the Length of Rectangle : ");

  scanf("%d", &length);

 

  printf("\nEnter the Breadth of Rectangle : ");

  scanf("%d", &breadth);

 

  area = length * breadth;

  printf("\nArea of Rectangle : %d", area);

 

  return (0);

}

Explanation:

Enter the Length of Rectangle  : 5

Enter the Breadth of Rectangle : 4

Area of Rectangle : 20

Similar questions