Dr. A.P.J. Abdul Kalam Technical University (AKTU), Lucknow

Lab Exercise

39. Write a program to read numbers from a file and then write all ‘odd’ numbers to file ODD.txt & all even to file EVEN.txt.

Sample Input and Output

Stdin Inputs:

file.txt odd.txt even.txt

Sample Result:

Input file path: file.txt
Input Odd.txt file path: odd.txt
Input Even.txt file path: even.txt
File Saved Successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top
Scroll to Top