169k views
15 votes
How do I fix this do get an output counting down?

public class Main {
public static void main(String[] args) {
Main.countDownTo(5, 1);
}

public static void countDownTo(int from, int to) {

for( int counter = from; from <= to; from--) {
System.out.print(counter + ",");
}
}
}

1 Answer

10 votes

Answer:Its C

Explanation: Because the explanation is very cool and smart

User BigCheesy
by
3.4k points