Hello, I'm really thankful for your reply.
I can see your point, but what I don't understand is how to make an infinite array of numbers, or if there is a way of doing it without arrays. For example, if I had to use an array of 30 numbers, I would just use the for command and it would look like this
Code:
#include<stdio.h>
int main()
{
int j, k[30];
for (j=1; j<=30; j++)
{
printf("Enter a number: ");
scanf("%d", &k[j]);
}
printf("Numbers in interval <2;5> are {%d, %d, %d, %d}", k[2], k[3], k[4], k[5]);
return 0;
}
But I really have no clue how to print out an exact number with a while command..