Hello, newbie here and had a few questions if anyone could help. Currently not finished, case3 can be ignored. So right now everything is working fine sort of except right now I'm receiving an error if do not make a selection. Ex: I select fuzzy dice, it loops, then select 4 to exit. I get an error for not having a value for BeadTotal since it is unused. How could I solve this?
Second I also have to make it so negative Amount#'s are invalid, how would I go about doing this. Thanks!
You can initialize your Amount1 and Amount2 to 0 from the start of the program.
One way to solve for the negative amounts would be to use the absolute value function: abs(choice), that way if they enter -1, for example, it would be counted as a postive 1.
I see the end of your program, but not the beginning. I would guess that BeadTotal along with DiceTotal and maybe some other variables were not initialized. Because of that you have no idea what the value of BeadTotal is and most likely an unusable value for total. If the compiler did not give you a warning about uninitialized variables then the run time error may b because the value of Total exceeds the variable type.
As to checking for a negative number you will have to check for that after your input. I would suggest using a function to get the input and then validate if it is a usable value. The function could take a string like in line 20 and 26 to tell the user what information is required.