Ascending dreams, descending schemes

Report a typo

Can you complete the code to create two loops that count from 1 to 5? The first loop should print the numbers in ascending order, while the second loop prints them in descending order.

Fill in the gaps with the relevant elements
publc class CounterLoop {
    public static void main(String[] args) {
         ( i ; ; ) {
            .(i);
        }
        for (int i ; ; ) {
            System.out.println(i);
        }
    }
}
i <= 5i--i++System.outiinti >= 1printlnfor= 4= 1

Create a free account to access the full topic