For example: L - Length & W - Width
start
sum = 0
input L, W
sum = L * W
print "The area of the rectangle is: SUM"
end
Chat with our AI personalities
main
{
int l,b,s,ch;
printf("\n menu options:");
printf("\n 1.rectangle:");
printf("\n 2.square:");
printf("\n enter your choice");
scanf("%d",&ch);
switch(ch)
{
case1:printf("\n enter the length and breadth:");
scanf("%d%d",&l,&b);
printf("\n area=%d",l*b);
printf("\n perimeter=%d",2*(l*b));
break;
case2:printf("\n enter the side:");
scanf("%d",&s);
printf("\n area=%d",s*s);
printf("\n perimeter=%d",4*s);
break;
default:printf("\n invalid value");
}
}
start
sum = 0
input L, W
sum = L * W
print "The area of the rectangle is: SUM"
end
To find the area of a rectangle you mutiply the base times the height. A=BH -jessica
Convert all unit length (width and length) to feet and then find the area (width * length) as normal.
LW = A 2 inches tall x 2 inches wide = 4 inches in area
L x W = A
L = 2
W=2
A =4
Remember that the area of a rectangle is width * height: static int getArea(Rectangle r) { return r.width * r.height; }
start read pie area circum print area print circum stop
jgfujtf
Perform encryption on the following PT using RSA and find the CT p = 3; q = 11; M = 5
By using that one thing.