Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int x = 2;
  6. int y = 3;
  7.  
  8. int main()
  9. {
  10. int x = 4;
  11. int y = 5;
  12.  
  13. cout << "Lokalni:" << endl;
  14. cout << "x = " << x << endl;
  15. cout << "y = " << y << endl << endl;
  16.  
  17. cout << "Globalni:" << endl;
  18. cout << "x = " << ::x << endl;
  19. cout << "y = " << ::y << endl << endl;
  20.  
  21. x = x - ::y;
  22. ::y = ::y + x;
  23.  
  24. cout << "Novi lokalni:" << endl;
  25. cout << "x = " << x << endl;
  26. cout << "y = " << y << endl << endl;
  27.  
  28. cout << "Novi globalni:" << endl;
  29. cout << "x = " << ::x << endl;
  30. cout << "y = " << ::y << endl;
  31.  
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement