Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. int h=0;
  5. int r=0;
  6. int v=0;
  7.  
  8. int cylinderVolume=0;
  9. int cylinderSurfaceArea=0;
  10.  
  11. void calc_vol(int);
  12. int main()
  13. {
  14.  
  15. printf("enter cylinder height\n");
  16. scanf("%d", &h);
  17.  
  18. printf("enter cylinder raduis\n");
  19. scanf("%d", &r);
  20.  
  21. double cylinderVolume = 3.14159*r*r*h;
  22. printf ("the volume is %d ", cylinderVolume);
  23.  
  24.  
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement