Computer Science, asked by ranjeet2692, 10 months ago

write a C program to calculate the area and perimeter of a rectangle.​

Answers

Answered by navjotn406
4

/*

* C Program to calculate area of a rectangle

*/

#include <stdio.h>

#include <conio.h>

int main(){

float length, width, area;

printf("Enter length of Rectangle\n");

scanf("%f", &length);

printf("Enter width of Rectangle\n");

scanf("%f", &width);

/* Area of Rectangle = Length X Width */

area = length * width;

printf("Area of Rectangle : %0.4f\n", area);

getch();

return 0;

}

Similar questions