2. Message Decoder Create a messageDecoder program that reads from a file (one character at a time), and writes all non-
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
2. Message Decoder Create a messageDecoder program that reads from a file (one character at a time), and writes all non-
2. Message Decoder Create a messageDecoder program that reads from a file (one character at a time), and writes all non-numeric characters to a file called Decoded Message.txt, displaying a secret (and motivational) message. ***Hint: .read() will return an int, but this can be type cast as a char. int and char are interchangeable (via type-casting) You could run a loop on a condition like charInFile != (char) -1 Don't forget that -1 is a special character that denotes the end of a file!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!