I can write the code to read the numbers and put them in an array with a loop but I cannot code the steps I've outline above as I've no idea how to implement something like that.
Type: Posts; User: looops
I can write the code to read the numbers and put them in an array with a loop but I cannot code the steps I've outline above as I've no idea how to implement something like that.
Ok sure, ill list the process with the above example
2 6 4
1 4 4 1
1, Reads 2, how many times the algorithm loops
2, Reads 6, addition of numbers can only be equal to or less than in a loop ...
Nothing as yet, as I am unsure where to start. I've an idea that uses stack queue but I am not sure that is relevant for my problem.
I have a set of numbers within a text file.
2 6 4
1 4 4 1
When the program reads these numbers it will start with the first line. It reads 2, this is the number of times the program should...