We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
#!/bin/bashdeclare-aarrayi=0#storing country names in the arraywhileread-rcountry;doarray[$i]=$country((i++))donefor((j=0;j<i;j++));doif[[$j-ge3]]&&[[$j-le7]];thenecho-n"${array[$j]} "fidone|paste-sd' '
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Slice an Array
You are viewing a single comment's thread. Return to all comments →
my solution