c++ – how do i make simple cashier program

i want to make simple cashier program
i understand it mathematically also drawing the algorithm. but have no knowledge of programming at all..
if i deposit

5 of IDR 20

5 of IDR 10

5 of IDR 5

10 of IDR 2

1st transaction was someone buying IDR 98 using IDR 100, i want the program where i input

sales : IDR 98

money received : IDR 100

then the program will show

change : IDR 2

also the program make the deposit of 10 of IDR 2 become 9 of IDR 2 automatically.
then show

the total sales : IDR 98

and when the 2nd transaction happen, the amount accumulate accordingly.
where do I start? with excel is ok, with python or c++ or java are also ok.