Fiddling with for statement

At times fiddling with C programs and syntax can be real fun. Following is a simple program in C, which currently is not working
#include <stdio.h>
int main(int argc, char *argv[])
{
int i, n = 20;
for ( i = 0; i < n; i--)
printf("-");
return 0;
}
You can change one character in the above program to make it working. There are three such solutions existing. So have fun with the C syntax and more than one way to accomplish task.

0 Comments: