Advertisement
MeehoweCK

Untitled

Nov 19th, 2022
590
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /* FUNKCJE
  6.  
  7. typ_zwracany nazwa_funkcji([argumenty])
  8. {
  9.     ciało_funkcji
  10. }
  11.  
  12. */
  13.  
  14. int suma(int a, int b)
  15. {
  16.     return a + b;       // zwrócenie wartości
  17. }
  18.  
  19. int main()
  20. {
  21.     cout << suma(5, 8) << endl;
  22.     cout << suma(13, 5) << endl;
  23.     cout << suma(1, 88) << endl;
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement