Advertisement
immanual1

emptyCell

Nov 7th, 2022
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | Source Code | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int arr[3][3]={0},i,j,r,temp;
  5.     scanf("%d",&r);
  6.     temp=r;
  7.     while(temp--){
  8.         int x,y;
  9.         scanf("%d%d",&x,&y);
  10.         arr[x-1][y-1]=1;
  11.     }
  12.     printf("Total empty cells - %d\n",9-r);
  13.     for(i=0;i<3;++i){
  14.         for(j=0;j<3;++j){
  15.             if(arr[i][j]==0){
  16.                 printf("%d %d\n",i+1,j+1);
  17.             }
  18.         }
  19.     }
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement