2023-11-27 15:32:21 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <math.h>
|
2023-12-04 15:56:21 +01:00
|
|
|
#include "kruh.h"
|
2024-01-22 14:41:15 +01:00
|
|
|
|
|
|
|
int circle() {
|
2023-11-27 15:32:21 +01:00
|
|
|
float r = 0;
|
|
|
|
float obsah = 0;
|
|
|
|
float obvod = 0;
|
|
|
|
float pi = 3.14;
|
|
|
|
|
|
|
|
printf("\nZadaj polomer:");
|
|
|
|
scanf("%f", &r);
|
|
|
|
|
2024-01-22 14:41:15 +01:00
|
|
|
obsah = pi * pow(r, 2);
|
2023-11-27 15:32:21 +01:00
|
|
|
obvod = 2 * pi * r;
|
|
|
|
|
|
|
|
printf("\nObsah obdlznika je %.2f a obvod je %.2f.", obsah, obvod);
|
|
|
|
return 0;
|
|
|
|
}
|