Computer Science, asked by ayrusha5853, 1 year ago

Write an algorithm to find area and perimeter of a rectangle

Answers

Answered by Anonymous
1
main algo
float l (length) , b (breadth), c;
switch ( n)
{
case 1 :
cin>>"enter length">>l;
cin>>"enter breadth">>b;
c =l×b ;
cout<<" area is "<<c;
break;

case2 :
cin>>"enter length">>l;
cin>>"enter breadth">>b;
c =2(l + b);
cout<<" perimeter is "<<c;
break;
}
Similar questions