fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int count=0;
  7. int input[25][25];
  8. bool flag[25][25]={false};
  9.  
  10. cin >> count;
  11. cin.ignore();
  12.  
  13. for(int i=0;i<count;i++)
  14. {
  15. for(int j=0;j<count;j++)
  16. {
  17. char temp;
  18. cin>>temp;
  19. if(strcmp(temp,'0')) input[i][j] = 0;
  20. else input[i][j] = 1;
  21. }
  22. cin.ignore();
  23. }
  24.  
  25. for(int i=0;i<count;i++)
  26. {
  27. for(int j=0;j<count;j++)
  28. {
  29. //if(!flag[i][j])
  30. cout << input[i][j];
  31. }
  32. cout << "" << endl;
  33. }
  34.  
  35.  
  36. return 0;
  37. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
7
0110100
0110101
1110101
0000111
0100000
0111110
0111000
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:19:22: error: ‘strcmp’ was not declared in this scope
    if(strcmp(temp,'0')) input[i][j] = 0;
                      ^
stdout
Standard output is empty