Computer Science, asked by aishwaryajadhav6271, 6 months ago

Write a program that inputs length and width of a rectangle and find its area and perimeter in c lenguage

Answers

Answered by Innocentgirl58
0

Answer:

#include <stdio.h>  

/* height and width of a rectangle in inches */

int width;          

int height;          

int area;            

int perimeter;      

int main() {

height = 7;

width = 5;

   perimeter = 2*(height + width);

printf("Perimeter of the rectangle = %d inches\n", perimeter);

 

area = height * width;

printf("Area of the rectangle = %d square inches\n", area);

return(0);

}

Similar questions