diff --git a/ex11.c b/ex11.c index 24273b5..19fb531 100644 --- a/ex11.c +++ b/ex11.c @@ -2,12 +2,10 @@ int main(int argc, char *argv[]) { - int i = argc; - int arg; - while(i > 0) { - arg = argc - i; - printf("arg %d: %s\n", arg, argv[arg]); - i--; + int i = 0; + while(i < argc) { + printf("arg %d: %s\n", i, argv[i]); + i++; } char *states[] = {