Chat with our AI personalities
#include<stdio.h> void main() { float length, breadth, area, perimeter; printf("Enter the length & breadth of a Rectangle\n(length breadth): "); scanf("%f %f",&length,&breadth); area=length*breadth; perimeter=2*(length+breadth); printf(" Area of the Rectangle=%0.3f\n",area); printf("Perimeter of the Rectangle=%0.3f\n",perimeter); printf("(Press ENTER to exit.)"); getch(); printf("\n"); }
class area{ int l,w,a; a=i*w; printf"area of rectangle is= %d",a; endl; }
start real length L and width w calculate the area A= Lw calculate the circumference C=2(L+w) Display A and C End
The diagonal works out as length of 33.3 cm or 333 mm To solve this you need to apply the equations for the area of a rectangle (a x b) and the perimeter of a rectangle (2a + 2b) as well as the Pythagorean Theorem (a^2 + b^2 = c^2).
Learn c programming and geometry. It will be easy when you know both.