source file name: areaRC.c

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

void main()

{

int len,bd,rad,arect,prect;

float acir,cc;

clrscr();

printf("\n enter length and breadth of Rectangle");

scanf("%d%d",&len,&bd);

printf("\n enter radius of circle");

scanf("%d",&rad);

arect=len*bd;

prect=2*(len+bd);

acir=3.142*rad*rad;

cc=2*3.142*rad;

printf("\n Area =%d  and Perimeter=%d of Rectangle ",arect,prect);

printf("\n Area =%f and Circumference  of Circle= %f ",acir,cc);

getch();

}

output: