Cut #1 HackerRank Solution

Hello Programmers, In this post, you will know how to solve the Cut #1 HackerRank Solution. This problem is a part of the HackerRank Linux Shell Series.

Ezoicreport this adCut #1 HackerRank Solution
Cut #1 HackerRank Solutions

One more thing to add, don’t directly look for the solutions, first try to solve the problems of Hackerrank by yourself. If you find any difficulty after trying several times, then you can look for solutions

Ezoicreport this adProblem

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 Format

A text file containing N lines of ASCII characters.

Constraints

  • 1 <= N <= 100

Output Format

For each line of input, print its 3rd character on a new line for a total of N lines of output.

Sample Input

Hello
World
how are you

Sample Output

l
r
w

Cut #1 HackerRank Solutions

# print the 3rd character from each line as a new line of output.
cut -c 3

Note: This problem (Cut #1) is generated by HackerRank but the Solution is Provided by  BrokenProgrammers. This tutorial is only for Educational and Learning purposes.

Next: Cut #2 HackerRank Solution

Sharing Is Caring

Leave a Comment

Ezoicreport this ad