Advertisement
Josif_tepe

Untitled

Dec 12th, 2022
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4. #include <stack>
  5. using namespace std;
  6.  
  7. void funkcija() {
  8.     static int c = 0;
  9.     c++;
  10.     cout << c << endl;
  11. }
  12. int main()
  13. {
  14.     for(int i = 0; i < 10; i++) {
  15.         funkcija();
  16.     }
  17.    
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement