Is it
anyone?Code:total = total + (mem_card * num_of);
total is a float and mem_card is a double. So the precision obtained in mem_card might be lost when assigning this new value to total.
Try making total a double.
Is it
anyone?Code:total = total + (mem_card * num_of);
total is a float and mem_card is a double. So the precision obtained in mem_card might be lost when assigning this new value to total.
Try making total a double.
i was getting similar output, can't figure out why though, sorry.
try this to get rid of the warnings...
Code:const double mem_card = 69.95; const double software = 34.98; const double nw_pc = 675.00; const double disk_drive = 198.50; double total = 0;
this is the new output and we got rid of the warnings lol ty very much
How many items would you like to buy? 3
Which items would you like to buy(Enter one item at a time then hit enter then t
ype in how many you want to buy)?
software
That is an invalid choice.
Which items would you like to buy(Enter one item at a time then hit enter then t
ype in how many you want to buy)?
That is an invalid choice.
Which items would you like to buy(Enter one item at a time then hit enter then t
ype in how many you want to buy)?
That is an invalid choice.
Your total is 0
hooch