0

I've been working on my cash problem but it keeps giving me error on the code especially the variables and Ienter image description here don't know why.

0

When you declare variable like int coins, q, d, n, p; this is like to label random boxes with corresponding lettering, but not yet put anything into them. There might still be something... but definitely not our stuff. For this reason compiler gives an error when he see while (d >= 10) and knows that we have not assigned any value to d yet. One way of resolving this can be to assign initial value to this int variables. Like int coins = 0; for example.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .