74. WRITE A C PROGRAM FUNCTION WITH NO ARGUMENTS & NO RETURN VALUE

/*C program Function with No Arguments & No Return Value*/

#include<stdio.h>
void area(); // Prototype Declaration
void main()
{
area();
}
void area()
{
float area_circle;
float rad;
printf("\nEnter the radius : ");
scanf("%f",&rad);
area_circle = 3.14 * rad * rad ;
printf("Area of Circle = %f",area_circle);
}

output

Enter the radius : 3
Area of Circle = 28.260000

Comments