20 lines
347 B
C
20 lines
347 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
#include "kruh.h"
|
|
|
|
int circle() {
|
|
float r = 0;
|
|
float obsah = 0;
|
|
float obvod = 0;
|
|
float pi = 3.14;
|
|
|
|
printf("\nZadaj polomer:");
|
|
scanf("%f", &r);
|
|
|
|
obsah = pi * pow(r, 2);
|
|
obvod = 2 * pi * r;
|
|
|
|
printf("\nObsah obdlznika je %.2f a obvod je %.2f.", obsah, obvod);
|
|
return 0;
|
|
}
|