Made a simple geometric workbench
This commit is contained in:
15
misc/geometric_workbench/rectangle.c
Normal file
15
misc/geometric_workbench/rectangle.c
Normal 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 b, h;
|
||||
scanf("%f%f", &b, &h);
|
||||
printf("%.3f\n", b*h);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user