fork download
  1. #include <iostream>
  2. using namespace std;
  3. bool
  4. f(int m, int n) {
  5. cout << m << " > " << n <<endl;
  6. return m > n;
  7. }
  8.  
  9. int main()
  10. {
  11. int m;
  12. int n;
  13. int s = 7;
  14. for (m=1; m<3; ++m)
  15. {
  16. for (n=1; n<3; ++n)
  17. {
  18. s+=(f(m,n) ? m : n);
  19. cout << s << endl;
  20. }
  21. }
  22. cout << s;
  23. return 0;
  24. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
1 > 1
8
1 > 2
10
2 > 1
12
2 > 2
14
14