19 lines
325 B
C
19 lines
325 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
|
|
int main(){
|
|
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;
|
|
}
|