Thursday, 30 August 2012

The length & breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area & perimeter of the rectangle, and the area & circumference of the circle.

 float l,b,r,A_r,P_r,A_c,C_c;
 printf("Enter length and breadth of a rectangle in cm\n");
 printf("Area of rectangle = %f\nPerimeter of rectangle = %f cm\n",A_r,P_r);
 printf("Enter radius of circle in cm\n");
 printf("Area of Circle = %f\nCircumference of circle = %f cm\n",A_c,C_c);


No comments:

Post a Comment