Find three ways to make the program below print 20 copies of the dash character '-' by changing /adding just one character.
int i,n=20; for(i=0;i<n;i--){ System.out.println("-"); }
I found two solutions but till now not able to find the third one. The two solutions are
int i,n=20; for(i=0;i<n;n--){ System.out.println("-"); }
and,
int i,n=20; for(i=0;-i<n;i--){ System.out.println("-"); }
Please help me out in finding the third solution.