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