KonradKonieczny

Funkcje - zadanie 19

Mar 30th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int pole_trojkata(int a, int h)
  6. {
  7.     return a*h/2;
  8. }
  9.  
  10. int x, y;
  11.  
  12. int main()
  13. {
  14.     cout << "Podaj dlugosc podstawy: "; cin>>x;
  15.     cout << "Podaj wysokosc: "; cin>>y;
  16.     cout<<"Pole trojkata wynosi: "<<pole_trojkata(x,y);
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment