Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <windows.h>
  4.  
  5. float area (int h,float Pi=3.14,float R=0.4)
  6. {
  7. float S;
  8. S = 2*Pi*R*h+2*Pi*R*R;
  9.  
  10. return S;
  11. }
  12.  
  13. float fNumber(int n,float h1)
  14. {
  15. return area(h1)*n;
  16. }
  17.  
  18. int main()
  19. {
  20. std :: cout << fNumber(10,1)+ fNumber(15,0.9) + fNumber(20,0.7)
  21. << std :: endl;
  22.  
  23. system ("pause");
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement