Ejercicio de la diagonal pricipal

REALIZAR UN ALGORITMO DONDE LA DIAGONAL PRINCIPAL TENGA 1 Y LOS DEMAS SEA 0:






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

using namespace std;
  main(){
  int mat[4][4];     
  int x,y;
    for(x=0;x<4;x++){
      for(y=0;y<4;y++){
       if(x==y){               
       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");    
  }
/*****************************************/