I want to create an array to store values from user input. The user input is in a while (choice=='y' || choice=='Y') loop. As long as the user keeps selecting Y/y at the end of the loop, they can enter more values and continue. I want to store the 2 values that are entered and a 3rd calculated value in an array. The user can stop after 1 value or keep going up to 100 iterations of the loop (if they so desire).
My original thought was to create 3 array variables but I am stuck trying to figure out the exact code needed to allow an array(s) to just grow, as needed. I do not want to preset the size of the array to any single value though. Any help in this manner would be appreciated.
My original thought was to create 3 array variables but I am stuck trying to figure out the exact code needed to allow an array(s) to just grow, as needed. I do not want to preset the size of the array to any single value though. Any help in this manner would be appreciated.
Comment