fork download
  1. #include <iostream>
  2. #include <clocale>
  3. #include <cstdlib>
  4. using namespace std;
  5.  
  6. void func1();
  7. void func2();
  8.  
  9. int count;
  10.  
  11. int main()
  12. { setlocale(LC_CTYPE, "rus");
  13. int i;
  14. for(i=0; i<10; i++)
  15. {
  16. count = i * 2;
  17. func1();
  18. }
  19.  
  20. system ("pause");
  21. return 0;
  22. }
  23. void func1()
  24. {
  25. cout << "count: " << count << "\n";
  26. func2();
  27. }
  28. void func2()
  29. {
  30. int count;
  31. for(count=0; count<3; count++) cout << '.';
  32. }
Success #stdin #stdout #stderr 0s 15240KB
stdin
Standard input is empty
stdout
count: 0
...count: 2
...count: 4
...count: 6
...count: 8
...count: 10
...count: 12
...count: 14
...count: 16
...count: 18
...
stderr
sh: 1: pause: not found