Using loops only to create sequence of numbers

preview_player
Показать описание
In this video we are going to be learning how to solve a question. please like, comment, and subscribe. the question is below
Write a java code segment using for loop Only to display the output below
(i) ascending order list of numbers
(ii) descending order list real numbers
(iii) descending order list of even numbers only
(iv) descending order list of odd numbers only

Output

(i) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
(ii) 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2
(iii) 20 18 16 14 12 10 8 6 4 2 and
(iv) 19 17 15 13 11 9 7 5 3 1
Рекомендации по теме
visit shbcf.ru