You need to first draw the diagram then you must determine your two formulas of area and perimeter like #=2L+2W and #=L•W and then you can use substitution from one formula to solve a single variable in the other formula.
Chat with our AI personalities
you need length and width length multiply width = area length + length + width + width = perimeter
Multiply length by width
#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"); }
To find the area of a rectangle, you multiply the width by the length. Area=width multiplied by length. To find the perimeter of a rectangle, you can either add all four sides of the rectangle together (p=w+w+l+l), or find the length and width of the rectangle and multiply that by 2 (p=2(w+l)). You can also find the perimeter by multiplying the width by 2 and the length by 2 and then adding those together (p=2w+2l).
for area you multiply length times width and for perimeter you add all of the sides together