Skip to main content

Practice ยท 2 of 4

Create It, Then Count It

Two steps in one program: (1) write input.txt containing EXACTLY these four lines, one per line: alpha, beta, gamma, delta. (2) Read the file back and print the number of lines (just the number).

Difficulty: beginner

Back to lesson: Practice: Read & Write Drills