/* Calculate The Area & Perimeter Of A Rectangle
And The Area & Circumference Of The Circle */
/* The Length And Breadth Of A Rectangle And Radius Of A Circle Are Input Through
The Keyboard. Write A Program To Calculate The Area & Perimeter Of A Rectangle
And The Circumference Of The Circle */
/* Suchetan Dey */
#include<stdio.h>
#include<conio.h>
void main()
{
float length,breadth,radius,area,perimeter,circumference;
printf("Enter The Length ");
scanf("%f",&length);
printf("Enter The Breadth ");
scanf("%f",&breadth);
printf("Enter The Radius ");
scanf("%f",&radius);
area=length*breadth;
printf("Area Of A Rectangle Is = %.2f \n", area);
perimeter=2*(length+breadth);
printf("Perimeter Of A Rectangle Is = %.2f \n", perimeter);
circumference=2*3.14*radius;/* 2 * pi symbol * r = 2*3.14*radius*/
printf("Circumference Of A Circle Is = %.2f \n", circumference);
getch();
}
The Output is :-
And The Area & Circumference Of The Circle */
/* The Length And Breadth Of A Rectangle And Radius Of A Circle Are Input Through
The Keyboard. Write A Program To Calculate The Area & Perimeter Of A Rectangle
And The Circumference Of The Circle */
/* Suchetan Dey */
#include<stdio.h>
#include<conio.h>
void main()
{
float length,breadth,radius,area,perimeter,circumference;
printf("Enter The Length ");
scanf("%f",&length);
printf("Enter The Breadth ");
scanf("%f",&breadth);
printf("Enter The Radius ");
scanf("%f",&radius);
area=length*breadth;
printf("Area Of A Rectangle Is = %.2f \n", area);
perimeter=2*(length+breadth);
printf("Perimeter Of A Rectangle Is = %.2f \n", perimeter);
circumference=2*3.14*radius;/* 2 * pi symbol * r = 2*3.14*radius*/
printf("Circumference Of A Circle Is = %.2f \n", circumference);
getch();
}
The Output is :-
No comments:
Post a Comment