I am new to JAVA programming, and take classes online. This is one of my assignments, and trying to basically self teach myself how to do this. Here is the requirement:
Write a console program that uses a while loop to perform the following steps:
Prompt the user to input two integers: firstNum and secondNum where secondNum is at
least 10 greater than firstNum, both numbers are positive integers, and secondNum is less than 1000.
Verify that the user entered acceptable numbers, and if not, provide error feedback and prompt them again.
Output all results to a file in the same directory as the program, placing
an appropriate label between each section of output.
Note that your program must be able to run repeatedly overwriting the file from the previous run.
Output all odd numbers between firstNum and secondNum inclusive, one number per line.
Output the sum of all numbers between firstNum and secondNum exclusive.
Use a for loop to perform the following steps:
Continue writing to the same file as before.
Write ad label as before.
Output all numbers from secondNum to firstNum in a single line with commas separating the numbers.
Write the date and time as the last line in the file in the format yyy-mm-dd hh:mm:ss.
Notes:
Inclusive means that the firstNum and secondNum are output if appropriate
Exclusive means that the firstNum and secondNum are not output