fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main ()
  4. {
  5. int c, n;
  6. cin >> c >> n;
  7. if ( c>n)
  8. cout<< n (n-c/2)
  9. else
  10. cout << c << (n-c) /2;
  11. }
Compilation error #stdin compilation error #stdout 0s 4544KB
stdin
3 1
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:20: error: ‘n’ cannot be used as a function
     cout<< n (n-c/2)
                    ^
stdout
Standard output is empty