Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void walec(float r, float H, float *V, float *Ppc)
- {
- float pi == 3.14;
- *V = pi * r*r * H;
- *Ppc = (2 * pi * r*r) + (2 * pi * r * H);
- }
- int main()
- {
- float r, H, V, Ppc;
- printf("Wprowadz promien 'r': ");
- scanf("%f", &r);
- printf("Wprowadz wysokosc 'H': ");
- scanf("%f", &H);
- walec(r, H, &V, &Ppc);
- printf("Promien r: %.2f\n Wysokosc H: %.2f\n Objetosc V: %.2f\n Pole pow. calk: %.2f\n", r, H, V, Ppc);
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement