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