#include<stdio.h>
void main()
{
float length,width,radius,area_of_R,peri_m,area_of_C,circum_;
printf("Enter length of rectangl = ");
scanf(" \n %f",&length);
printf("Enter width of rectangl = ");
scanf(" \n %f",&width);
area_of_R=length*width;
printf("\n Area of rectangle = %f",area_of_R);
peri_m=2*(length+width);
printf("\n Perimeter of rectangle = %f",peri_m);
printf("\n Enter length of radius = ");
scanf("%f",&radius);
area_of_C=22*radius*radius/7;
printf("\n Area of circle = %f",area_of_C);
circum_=22*2*radius/7;
printf("\n Circumference of circle = %f",circum_);
}
Tags:
Basic C program