I am getting an error message of "expression result unused" for all of my while loops when I try to run the user input through my greedy algorithm. Any thoughts?
Google search of
expression result unused will lead to 2 links :
It seems that you have written the number in a wrong way. Have a look at it, you are not supposed to write commas in the numbers. i.e.
int i = 50,000is wrong way and should be written as
int i = 50000. Remove any such commas from your program.
Although the link is of for loop but here, re-initialization of the variable used for iterating was not done properly. If variable j is used for iteration, then
j+1is not the way of re-initialization, may be typo could be its reason, it should be
j += 1or
j = j+1.
Please specify if any of these 2 worked, if not, then need to see the code. You may cut short the code and not disclose whole of it.