DIY C Program on Area of a Circle(

Area of a Circle

DIY C Program on Area of a Circle(

Write a program to find the area of a circle using functions.

float calcarea(float x)

Input Format:
Input consists of 1 floating point number which corresponds to the radius of the circle.

Output Format:
Output consists of a single floating point number (correct to 2 decimal places). Refer sample output for
formatting details.
Take the value of pi as 3.14.

Sample Input:

Sample Output:
The area of the circle is 28.26


#include <stdio.h>
float calcarea (float x);
int main()
int x;
float a;
scanf("%d", &x);
a = calcarea (x);
printf("The area of the circle is %.2f\n", a);
return 0;
float calcarea (float x)
float res;
res = ((x * x) * 3.14);
return res;


  1. It's the best time to make some plans for the long run and it is time to be happy. I have learn this publish and if I may just I wish to counsel you some interesting things or tips. Perhaps you could write next articles referring to this article. I want to read more issues approximately it!
    seo in philippines

  2. Hi, I have recently completed a comprehensive C++ in Urdu tutorial.


Your Comments here.

© Copyright 2015. Website by Way2themes - Published By Gooyaabi Templates