fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. Int a = 0, b = 0;
  6. For ( int i = 0; i < 72; i++)
  7. { char c; cin >> c;
  8. If (c == 'q') a+=9;
  9. Else if ( c == 'Q') b+=9;
  10. Else if ( c == 'R') b+=5;
  11. Else if ( c == 'r') a+=5;
  12. Else if ( c == 'B' || c =='N') b+=3;
  13. Else if ( c == 'b' || c == 'n') a+=3;
  14. Else if ( c == 'P') b+=1;
  15. Else if ( c == 'p') a+=1;
  16.  
  17. }
  18. If (b > a) cout << 'White'<<endl;
  19. Else if (b < a) cout << 'Black' << endl;
  20. Else cout << 'Draw' << endl;
  21. return 0;
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
...QK...
........
........
........
........
........
........
...rk...
compilation info
prog.cpp:18:20: warning: character constant too long for its type
 If (b > a) cout << 'White'<<endl;
                    ^
prog.cpp:19:25: warning: character constant too long for its type
 Else if (b < a) cout << 'Black' << endl;
                         ^
prog.cpp:20:14: warning: multi-character character constant [-Wmultichar]
 Else cout << 'Draw' << endl;
              ^
prog.cpp: In function 'int main()':
prog.cpp:5:5: error: 'Int' was not declared in this scope
     Int a = 0, b = 0;
     ^
prog.cpp:6:11: error: expected primary-expression before 'int'
     For ( int i = 0; i < 72; i++) 
           ^
prog.cpp:6:22: error: 'i' was not declared in this scope
     For ( int i = 0; i < 72; i++) 
                      ^
prog.cpp:18:5: error: 'b' was not declared in this scope
 If (b > a) cout << 'White'<<endl;
     ^
prog.cpp:18:9: error: 'a' was not declared in this scope
 If (b > a) cout << 'White'<<endl;
         ^
prog.cpp:18:10: error: 'If' was not declared in this scope
 If (b > a) cout << 'White'<<endl;
          ^
prog.cpp:19:1: error: 'Else' was not declared in this scope
 Else if (b < a) cout << 'Black' << endl;
 ^
prog.cpp:20:6: error: expected ';' before 'cout'
 Else cout << 'Draw' << endl;
      ^
stdout
Standard output is empty