CJCoding With Joseph
15free / daySign inCreate account

Save stdin Uppercased

Read every line from standard input until the input ends, convert each line to uppercase, and write the uppercased lines to the file input_copy.txt (create or truncate it; one line per input line, each followed by a newline). Then close the file, reopen input_copy.txt with an ifstream, and print every line it contains.

Example input:
hello
world

The output for that input is shown in Expected Output.

Expected Output:

HELLO
WORLD
MIXED CASE 123
ABC DEF

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
Streamsofstream
📥 Auto-Input:
hello\nworld\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.