Vlad5080

Untitled

Dec 1st, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void kvadrat() {
  6. int S, a, b;
  7. cin >> a >> b;
  8. S = a * b;
  9. cout << S;
  10. }
  11.  
  12. void triangle() {
  13. int S, a, h;
  14. cin >> a >> h;
  15. S = (a * h) / 2;
  16. cout << S;
  17. }
  18.  
  19. void circle() {
  20. int S, r;
  21. cin >> r;
  22. S = 3.14 * pow(r, 2);
  23. cout << S;
  24. }
  25.  
  26. int main() {
  27.  
  28. kvadrat();
  29.  
  30. triangle();
  31.  
  32. circle();
  33.  
  34. system("pause");
  35. return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment