Hey, so i'm working on studying arrays and i tried to set up this little program to run, and it works fine but when i enter a value that returns over 100 and it should print the customer's balance, it instead just prints $0.00, and i don't know why, could anyone help with this?
no one? my one source of hope has failed </3
>>>/g/dpt
try there, from a quick look it seems fine
>>51868155
you should have linked to a hastebin of the source so I don't have to retype half of your program
you're trying to print a float but your balances are integers
Going to bed now.
Issue is types.
> int custBal
You need float. And force all nums to float i.e.
float custBal[] = {0.00f, 45.43f .. etc)
> if custBal[cnt] > 100.0
Should be > 100.0f
>>51868494
ah i was looking for your problem but i didn't see this part
>but when i enter a value that
>returns over 100
Floats!=integers
>>51868632
meant to say it's probably this
>>51868494
>>51868535
this