Advertisement
Saleh127

Untitled

Apr 22nd, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int a[10][10]= {0},b,c,d,e,i,j,k,l;
  6. for(i=1; i<4; i++)
  7. {
  8. for(j=1; j<4; j++)
  9. {
  10. cin>>a[i][j];
  11. }
  12. }
  13. for(i=1; i<4; i++)
  14. {
  15. for(j=1; j<4; j++)
  16. {
  17. b=a[i][j]+a[i][j-1]+a[i-1][j]+a[i][j+1]+a[i+1][j]+1;
  18. printf("%d",b%2);
  19. }
  20. printf("\n");
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement