Aquaa Marine
Newbie level 3
Hello..
I need to design a vending machine which can accept 10tk, 20tk n 50tk only. It will dispense chocolate, chips n bar.
Inputs,
Select 1 for chocolate,
Select 2 for chips,
Select 3 for bar
and they cost 10tk, 20tk n 30 tk respectively..
Now I am not understanding how to do coding if I select 3 (as in I want a bar) n put 50 Tk, then I will get the bar ( Not chocolate/ chips) with exchange 20 tk.
Hope I will get some help asap.
Thanks
I need to design a vending machine which can accept 10tk, 20tk n 50tk only. It will dispense chocolate, chips n bar.
Inputs,
Select 1 for chocolate,
Select 2 for chips,
Select 3 for bar
and they cost 10tk, 20tk n 30 tk respectively..
Now I am not understanding how to do coding if I select 3 (as in I want a bar) n put 50 Tk, then I will get the bar ( Not chocolate/ chips) with exchange 20 tk.
Hope I will get some help asap.
Thanks
Last edited: