Question: Writ a Java program that reads numbers entered from the keyboard ( Console ) , determines whether each number is even or odd, and then
Writ a Java program that reads numbers entered from the keyboard Console determines whether each number is even or odd, and then writes them to separate files named "even.txt for even numbers and "odd.txt for odd numbers. Finally, read from both files and list and count the even and odd numbers to the Console with the proper format.
tableSample Input,DescriptiontableThe input is from keyboard ConsoleSample Output,Descriptiontabletable The output file for even numbers is inNotepad formatted as a txt filenamed "even.txt The file contains each even number ona separate line.tabletable The output file for odd numbers is inNotepad formatted as a txt filenamed "odd.txt The file contains each odd number on aseparate line.tableEven Number: Total of Even: Odd Number: Total of Odd: table Read both "even.txt and "odd.txtfiles List and count the even and odd
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
