Diagonal secundaria

EN UNA MATRIZ DE 4X4 CUYOS ESPACIOS TIENEN ALMACENADO 0 ,PONER EN LA MATRIZ SECUNDARIA 1.


#include<iostream>
#include<conio.h>
#include<iomanip>

using namespace std;
  main(){
  int mat[4][4];     
  int x,y,a=4;
    for(x=0;x<4;x++){
       a--;             
      for(y=0;y<4;y++){             
       if(y==a){               
       mat[x][y]=1;
       }else{
        mat[x][y]=0;    
       }
        }
       
      }
      
   /****************************************/
    for(x=0;x<4;x++){
      cout<<" "<<endl;              
      for(y=0;y<4;y++){
       cout<<" "<<mat[x][y];
      }
    } 
    cout<<" "<<endl;
    system("pause");    
  }
/*****************************************/