I'm trying to make a program which allows the user to insert 5 numbers, define if they are even or odd, store them to an array and print the numbers that the user insert into the array.
It's a pretty simple program that I'm doing just to learn how to use the arrays. The problem is that it doesn't print out the values of the array. Why?
int main () {
int list [5];
int i = 0;
while (i < 5) {
printf("Insert the number\n");
scanf("%d", &list[i]);
if (i % 2 == 0) {
printf("Even\n");
}
else{
printf("Odd\n");
}
i++;
}
i=0;
while (i < 5){
printf("%d\n", &list[i]);
i++;
}
return 0;
}