I want to write a program to control the action of a chocolate machine. Displaying a message to ask
what kind of chocolate is required: Plain (30p), Brazil nut (35p), Luxury (50p). Us
on the choice. Then money must be requested, in the form: “Please insert 30p “
depending on the selection. this message must be displayed until the required amount has been
input. If too much has been inserted, then a message indicating the amount of
change owing should be displayed. And also display a message indicating ‘Thanks for Buying’. use the
function and switch command.
what kind of chocolate is required: Plain (30p), Brazil nut (35p), Luxury (50p). Us
on the choice. Then money must be requested, in the form: “Please insert 30p “
depending on the selection. this message must be displayed until the required amount has been
input. If too much has been inserted, then a message indicating the amount of
change owing should be displayed. And also display a message indicating ‘Thanks for Buying’. use the
function and switch command.
Comment