Hello Programmers, In this post, you will know how to solve the Looping with Numbers HackerRank Solution. This problem is a part of the HackerRank Linux Shell Series.
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.
Problem
Use a for loop to display the natural numbers from 1 to 50.
Input Format
There is no input
Output Format
1
2
3
4
5
.
.
.
.
.
50
Looping with Numbers HackerRank Solutions
#!/bin/bash for i in {1..50} do echo $i done
Note: This problem (Looping with Numbers) is generated by HackerRank but the Solution is Provided by BrokenProgrammers. This tutorial is only for Educational and Learning purposes.