Skip to content

Instantly share code, notes, and snippets.

@RhoKratos
Created October 20, 2017 22:54
Show Gist options
  • Save RhoKratos/7e54c8725276131ab7f97fff63ef26ba to your computer and use it in GitHub Desktop.
Save RhoKratos/7e54c8725276131ab7f97fff63ef26ba to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(){
int matriz[4][4]={{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}};
int ren, col;
for(ren=0; col<4; ren++){
for(col=0; col<4; col++){
if(ren==col);
printf("1");
else
printf("0");
}
printf("\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment