Good day everyone, I would like to ask of how to start this kind of problem.
Create a program that continually accepts input from the user.
The input shall be in this format operator number like +2.
If the input is not in the format, your program will display:
Invalid input, try again. This will display until a valid input is achieved.
If the input is -0. The program will stop and display the output:
The result of +1-3/5*3 is -1.2
In the example, the inputs of the user are +1, -3, /5, and *3.
Noted: Make necessary conditions to avoid errors.
Aucun commentaire:
Enregistrer un commentaire