HackerRank - Cut #1
April - 25/2025Problem:
Given N lines of input, print the 3rd character from each line as a new line of output. It is guaranteed that each of the n lines of input will have a 3rd character.
# Input
- Hello
- World
- How are you
# Output
- l
- r
- w
# Solution
cut -c 3
# Solution_01
while read line
do
echo "$line" | cut -c 3;
done
Post:
- - Cut #2;