back to a more normal while-loop

This commit is contained in:
Dan Buch 2011-09-10 00:27:04 -04:00
parent 1d4044d586
commit 933a9a04fc

10
ex11.c
View File

@ -2,12 +2,10 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int i = argc; int i = 0;
int arg; while(i < argc) {
while(i > 0) { printf("arg %d: %s\n", i, argv[i]);
arg = argc - i; i++;
printf("arg %d: %s\n", arg, argv[arg]);
i--;
} }
char *states[] = { char *states[] = {