fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int Fx=4, Fy=5, x, y, m[8][8];
  6. cin>>x;
  7. cin>>y;
  8. for(x=0; x<7; x++)
  9. for(y=0;y<7;y++)
  10. if (x==Fx || y==Fy || abs(x-Fx)==abs(y-Fy))
  11. m[x][y] = 1;
  12. else m[x][y] = 0;
  13. for(x=0; x<7; x++)
  14. for(y=0;y<7;y++)
  15. cout<<m[x][y];
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
3
compilation info
prog.cpp: In function 'int main()':
prog.cpp:10: error: 'abs' was not declared in this scope
stdout
Standard output is empty