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.
This is how I did mine and it passed all tests. I'm kinda new to this too but I think it's because you're limiting the output of the array to start at position 3 then counting down.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays Introduction
You are viewing a single comment's thread. Return to all comments →
for(i=N; i >0; i--) { cout << nums[i] << " ";
This is how I did mine and it passed all tests. I'm kinda new to this too but I think it's because you're limiting the output of the array to start at position 3 then counting down.