MeehoweCK

Untitled

Apr 16th, 2021
484
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. /* FUNKCJA - składnia
  6.  
  7. typ_zwracany nazwa_funkcji([argumenty_wejściowe])
  8. {
  9.     ciało_funkcji
  10. }
  11.  
  12. */
  13.  
  14. int suma(int a, int b)
  15. {
  16.     return a + b;
  17. }
  18.  
  19.  
  20. int main()
  21. {
  22.     cout << suma(3, 8) << endl;
  23.     cout << suma(100, 20) << endl;
  24.  
  25.     int liczba1, liczba2;
  26.     cin >> liczba1 >> liczba2;
  27.     cout << suma(liczba1, liczba2) << endl;
  28.  
  29.     return 0;
  30. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×