Advertisement
MeehoweCK

Untitled

Nov 25th, 2020
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void funkcja(int& liczba)
  6. {
  7.     cout << liczba << endl;     // 2. 10
  8.     ++liczba;
  9.     cout << liczba << endl;     // 3. 11
  10. }
  11.  
  12. int main()
  13. {
  14.     int liczba = 10;
  15.     cout << liczba << endl;     // 1. 10
  16.     funkcja(liczba);
  17.     cout << liczba << endl;     // 4. 11
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement