Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com

Print Name

Easy
0/40
Average time to solve is 5m
profile
Contributed by
26 upvotes
Asked in company
Capegemini Consulting India Private Limited

Problem statement

You are given a string ‘S’ of lowercase English alphabets, you are required to print ‘S’ 5 times, each on a new line using a while loop.

EXAMPLE:
Input: 'S' = ‘alicia’

Output: alicia
        alicia
        alicia
        alicia
        alicia
Detailed explanation ( Input/output format, Notes, Images )
Input Format :
The first line will contain the integer 'T', the number of test cases.

For each test case, there will be only one line containing a string ‘S’.
Output format :
For each test case, print the ‘name’ five times, each on a new line.
Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Constraints :
1 <= 'T' <= 10
1 <= 'S.Length' <= 10^4

Time Limit: 1 sec
Sample Input 1 :
2
ramu
shamu
Sample Output 1 :
ramu
ramu
ramu
ramu
ramu
shamu
shamu
shamu
shamu
shamu
Sample Input 2 :
2
ankush
kannu
Sample Output 2 :
ankush
ankush
ankush
ankush
ankush
kannu
kannu
kannu
kannu
kannu
Full screen
Console