Question: This is Java Programming. Please make variable clear and maybe add comments for easy understanding. Thanks in advance! Do not use any data structures such
This is Java Programming.
Please make variable clear and maybe add comments for easy understanding.
Thanks in advance!

Do not use any data structures such as array or ArayList to store data. 1. Write a program as follows a) b) c) Prompt the user to input two distinct integers: nl and n2 If the user enters the negative number(s), convert it them to positive number(s) Ifnl is greater than n2, swap them (make sure nl is smaller than n2) Then, use four separate while loops to do the following d) Use a while loop to output all the numbers divisible by 5 from nl and n2 inclusive and the sum of th numbers e) Use a while loop to output all the numbers not divisible by 5 from nl and n2 inclusive and the avera of these numbers f) Use a while loop to output all the odd numbers between n2 to nl (large to small) inclusive Use a while loop to output the table of each even integer and its square between 2 and 16 inclusive g) Sample run: Enter 2 distinct integers Enter first number: 25 Enter second number -4 Numbers divisible by 5 between 4 and 25: 5 10 15 20 25 Sum of these numbers: 75 Numbers not divisible by 5 between 4 and 25: 4 6789 11 12 13 14 16 17 18 19 21 22 23 24 Average of these numbers: 14.35 Odd numbers between 25 and 4 (large to small): 25 23 21 19 1715 13 11 97 5 Table of each even integer and its square between 2 and 16: 4 16 6 36 8 64 12 144 14 196 16 256
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
