Currently, I am trying to test something but I am stuck. Now I do not have to use switch
–case
. I could use if
–else
instead, but I just figured that switch
–case
statements are easier.
Anyway, I want to use either switch
–case
statements or if
–else
statements to verify that the user only inputs numbers and then re-direct them somewhere depending on if the verification failed or passed. Now I have tested this. It works, but it like crashes when the user enters in anything other than only numbers. I would like to put the verification code under the comment /*Error message for if the user entered any non-numbers.*/
if possible. How would I accomplish this?
Aucun commentaire:
Enregistrer un commentaire