CJCoding With Joseph
15free / daySign inCreate account

Count The Long Lines

Three lines read from input are written to mixed.txt and read back in a loop that already strips the newline. Inside it, when the length of line is above 5 add 1 to long_lines; the print after the loop (already written) outputs <n> long line(s). Input: three lines, no prompt.

Expected Output:

2 long line(s)

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

Hints2 available
Topics:
Files
📥 Auto-Input:
elephant\ncat\nbutterfly\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 · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.