Ako sam te dobro razumeo tebi treba nesto ovako:
012 => 036
345 => 147
678 => 258
Ako je to kod je sledeci:
Code:
#include <stdio.h>
#define WIDTH 5
#define HEIGHT 5
int main()
{
int x,y;
int array[HEIGHT][WIDTH];
for (y = 0; y < HEIGHT; y++)
{
for (x = 0; x < WIDTH; x++)
{
printf("Unesi x i y: ");scanf("%d", &array[y][x]);
}
}
for (x = 0; x < WIDTH; x++)
{
for (y = 0; y < HEIGHT; y++)
{
printf("%d ",array[y][x]);
}
printf("\n");
}
return 0;
}
The earth teaches us more about ourselves than all the books. Because it resists us. Man discovers himself when he measures himself against the obstacle.