n1, n2, n3, ... , n(nth).

closed account (18hRX9L8)
Is there anyway in a while loop program that I can do a variable to the nth?

For example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
main()
{
      int num1,min,max;     
      printf ("Signal the end of your list with 0.\n");
      printf ("Enter 1st Number  ");
      num1=GetInteger();
      
       while (num1!=0)
       {
             printf ("Next number? ");
             //Can I do num(n)=GetInteger?//
             num1=GetInteger();
       }
       printf ("The maximum number in the list is %d.",max);
       printf ("The minimum number in the list is %d.",min);

getchar();
}


If I can how do I do that? What do I need to include?

Thanks,
Usandfriends
Topic archived. No new replies allowed.