Part 3
Follow-up of last post. The code has changed since then.
Problem 1: Input not adding to totl
4 Replies
Code:
Maybe @WeeGee could help me out?
Or how b @PenPengu ?
You don't need to make a new channel for each change set you make, and pinging for it isn't usually a thing
You still haven't added break statements to all of your
case
sOh
Oh silly me
And also
The reset inteface not working @WeeGee
@WeeGee There's a problem with the start over interface! The * and # aint working
Most of your problems are still to do with the missing
break
s in your case
s
You don't want every case after the one that runs to run, so you need to explicitly put that in
Here's a demo in C that you can run in the browser that shows the problem
https://tio.run/##XctNDoIwEAXgdXuKBhe0IRr@F4KuPIabpoBMgsXQEheGs9eChjRdzcz75onjQwhjDiDFMDctqZVuYDz1VwxSkycHSRn5YNSNE10TIBcSV3bUpLAjiphFpN6gRU9hO5DgqiXxeV3Ra7bAJxrGIat2TDxMXEw9TF3MPMxczD3MXSw8LFwsPSz/2LQdnwe9q6LB7RcF28OCndJdbq0FL8Z8AQ
this outputs
if you want it to be what you're trying to do, you need to do this:
edit: changed indentation
each case ending with a break
this outputs
if you want something to reference on this, there's a decent tutorial on general control flow statements here:
https://cplusplus.com/doc/tutorial/control/