#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");
}
Write two simultaneous equations and solve them. One for the perimeter, one for the area.
The perimeter of a rectangle is the sum of the four sides.
The perimeter of a rectangle, like the perimeter of any closed two-dimensional figure, is the distance around it. The perimeter of the rectangle is the sum of two lengths plus two widths.
PRINT "Give me the rectangle's length.": Input L PRINT "Give me the rectangle's width.": Input W PRINT "The rectangle's area is "; L x W PRINT "The rectangle's perimeter is "; 2 x (L + W) PRINT "You've been a great audience. I'm here til Thursday. Don't forget to tip your waiter. Have a nice day."
s=side length P=perimeter P=4s
Write two simultaneous equations and solve them. One for the perimeter, one for the area.
The perimeter of a rectangle is the sum of the four sides.
The perimeter of a rectangle, like the perimeter of any closed two-dimensional figure, is the distance around it. The perimeter of the rectangle is the sum of two lengths plus two widths.
p=2l+2w
write an algorithm and draw a flow chart to find perimeter of a square
Write an equation for the perimeter, and solve it. Remember that the perimeter is the sum of all four sides.
This question has no unique answer. A (3 x 2) rectangle has a perimeter = 10, its area = 6 A (4 x 1) rectangle also has a perimeter = 10, but its area = 4 A (4.5 x 0.5) rectangle also has a perimeter = 10, but its area = 2.25. The greatest possible area for a rectangle with perimeter=10 occurs if the rectangle is a square, with all sides = 2.5. Then the area = 6.25. You can keep the same perimeter = 10 and make the area anything you want between zero and 6.25, by picking different lengths and widths, just as long as (length+width)=5.
PRINT "Give me the rectangle's length.": Input L PRINT "Give me the rectangle's width.": Input W PRINT "The rectangle's area is "; L x W PRINT "The rectangle's perimeter is "; 2 x (L + W) PRINT "You've been a great audience. I'm here til Thursday. Don't forget to tip your waiter. Have a nice day."
write a vb program to find the magic square
The perimeter of a square is 400 meters. write an equation for the perimeter and solve for the length of one side
to find area and perimeter of a rectangle
CLS PRINT "PROGRAM: Calculate both perimeter/area of rectangle" PRINT INPUT " Length"; length INPUT "Breadth"; breadth PRINT PRINT "Perimeter: "; 2 * (length + breadth) PRINT " Area: "; length * breadth END