Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
\table[[Sample Input,Description],[\table[[10],[1154992046377901372249]],The input is from keyboard (Console).],[Sample Output,Description],[\table[[54],[204],[22]],\table[[- The output file for even numbers is in],[Notepad, formatted as a *.txt file],[named "even.txt".],[- The file contains each even number on],[a separate line.]]],[\table[[11],[99],[63],[77],[901],[37],[49]],\table[[- The output file for odd numbers is in],[Notepad, formatted as a *.txt file],[named "odd.txt".],[- The file contains each odd number on a],[separate line.]]],[\table[[Even Number: 5420422],[Total of Even: 3],[Odd Number: 119963779013749],[Total of Odd: 7]],\table[[- Read both "even.txt" and "odd.txt"],[files.],[- List and count the even and odd]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions