Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main() {
- int vstup;
- float polomer;
- printf("Pro vypocet obvodu zadejte cislo 1, pro vypocet obsahu jakekoliv jine cislo: ");
- scanf("%d",&vstup);
- printf("Zadejte polomer: ");
- scanf("%f",&polomer);
- if(vstup == 1)
- printf("Obvod kruhu s polomerem %.2f je %f.",polomer,2.*M_PI*polomer);
- else
- printf("Obsah kruhu s polomerem %.2f je %f.",polomer,M_PI*pow(polomer,2));
- }
Advertisement
Add Comment
Please, Sign In to add comment