counting backwards instead

This commit is contained in:
Dan Buch 2011-09-10 00:26:24 -04:00
parent 6c210c9b40
commit 1d4044d586

10
ex11.c
View File

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