Advertisement
endreweast

С, 7 варіант, 2 лабараторна

Sep 30th, 2015
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. /* С, 7 варіант, 2 лабараторна */
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <math.h>
  5. #define Pi 3.14
  6. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  7.  
  8. int main()
  9. {
  10.     float V,r,h;
  11.     printf("Enter r,h\n");
  12.     scanf("%f%f", &r,&h);
  13.     V=1/3*(Pi*pow(r,2)*h);
  14.     printf("V=%.2f\n", V);
  15.     system("pause");
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement