Advertisement
Weegee

Untitled

Aug 31st, 2010
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void main(void)
  4. {
  5.     int array[4][4] =
  6.     {
  7.         {0,0,0,0},
  8.         {0,0,0,0},
  9.         {0,0,0,0},
  10.         {0,0,0,0}
  11.     };
  12.     int x, y;
  13.     array[0][0] = 1;
  14.     array[1][1] = 3;
  15.     array[2][2] = 3;
  16.     array[3][3] = 7;
  17.  
  18.     // Ausgeben des Arrays
  19.     for(x = 0; x < 4; x++)
  20.     {
  21.         for(y = 0; y < 4; y++)
  22.         {
  23.             printf("%d ",array[x][y]);
  24.         }
  25.         printf("\n");
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement