0
Chocolates
Hi, could you please see my code named chocolates and tell me if there is anything wrong with it because when I put the numbers it appears 0. Thanks
3 Answers
+ 3
You have to put cin command before the total variable declaration. Like this:
int kg;
float cant;
cin >> kg;
cin >> cant;
float total=kg*cant ;
float tot=total-(total/100*10);
float to=total-(total/100*15);
float t=total-(total/100*20);
+ 1
Thanks!!
+ 1
You are welcome!