Write a program that will obtain the length and width of a rectangle from the user and Compute its area and perimeter.

#include <stdio.h>
#include<CONIO.H>

main()

{

clrscr();
float length, breadth, aor, por;

printf ("\nEnter the Length and Breadth of the Rectangle: ");
scanf("%f %f", &length, &breadth);


aor = length*breadth;
por= 2*(length+breadth);


printf("\nThe area of the rectangle is: %f", aor);

printf("\nThe perimeter of the rectangle is: %f ", por);


getch();
}
Next Post Previous Post
No Comment
Add Comment
comment url