Made a simple geometric workbench

This commit is contained in:
2015-10-16 23:15:01 +02:00
parent 614d8aa3c8
commit ad9b6457e0
6 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#include <stdio.h>
#include <math.h>
/* Simple program to calculate the area and circumference of a circle.
* Remeber to compile with the -lm option to link the math library.
* The math library includes pow (to the power of) and M_PI (pi).
*/
int main()
{
float radius;
scanf("%f", &radius);
printf("%.3f\n", M_PI*(pow(radius, 2)));
return 0;
}