Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main()
- {
- float a, h, P, O, Ph, Oh, hP, hO;
- printf("Uneti stranicu :\n");
- scanf("%f", &a);
- printf("Uneti koliko se puta stranica povecava :\n");
- scanf("%f", &h);
- P=a*a;
- O=4*a;
- Ph=(a*h)*(a*h);
- Oh=4*(a*h);
- hP=Ph/P;
- hO=Oh/O;
- if(hP==0)
- printf("Stranica se ne moze povecati 0 puta");
- else
- printf("Povrsina se povecala %f puta.\n", hP);
- if(hO==0)
- printf("Stranica se ne moze povecati 0 puta");
- else
- printf("Obim se povecao %f puta.\n", hO );
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement