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.
Here's my question, why does looping with auto get random results? I used int scores[5] then in input and calculateTotalScore I used for (auto i: scores). I finally changed it to a for loop and it worked, but wasn't I technically doing the same thing??
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Classes and Objects
You are viewing a single comment's thread. Return to all comments →
Here's my question, why does looping with auto get random results? I used int scores[5] then in input and calculateTotalScore I used for (auto i: scores). I finally changed it to a for loop and it worked, but wasn't I technically doing the same thing??