Module: (Java) Loops. Loop with parameter (for)


Problem

4/17

For loop header - features

Theory Click to read/hide

Each part of the header can have multiple statements separated by commas.
Header examples:
	for ( i = 0; i < 10; i ++ ) { ... }
        //standart header
	for ( i = 0, x = 1.; i < 10; i += 2, x *= 0.1 ){ ... }   
        //in this case, we use two variables that will change after the execution of the loop body - these are the variables i and x
         // variable i changes in increments of 2:  i + = 2 - abbreviated notation from i = i + 2
         // variable x with each step increases by 0.1 times x = x * 0.1 - abbreviated x * = 0.1

Problem

Change the title of the loop so that the values of two variables i and b are outputed
The value of variable i should vary from 1 to 5, and the value of variable b from 5 to 1
The output should be like this:
1 5
2 4
3 3
4 2
5 1
Please note that you only need to change the title of the loop!