Untitled

 avatar
unknown
plain_text
a year ago
428 B
5
Indexable
// Online C compiler to run C program online
#include <stdio.h>

int main() {
   int arr[100][100];
   for(int i=0;i<4;i++){
       for(int j=0;j<4;j++){
          if(i==j){
               arr[i][j]=1;
          }
          else{
              arr[i][j]=0;
          }
       }
   }
    for(int i=0;i<4;i++){
       for(int j=0;j<4;j++){
           printf("%d",arr[i][j]);
       }
       printf("\n");
    }
   
    return 0;
}
Editor is loading...
Leave a Comment