I have done up a program which requires the following:
- prompts user input account no
- prompts user input account type
- if account
type == a, prompts some input and does a certain formula [if] - if account
type == b, prompts some input and does another formula [else if] - if account type is wrong(not a or b), prompts error and return to 2 [else]
- if account
- prompts user input to exit [do while]
- if
input == y, exits - if
input == n, return to 1
- if
at the moment I’m pretty stuck at 2.3.
it prompts the error and goes to 3 instead of returning to 2 to prompt user input.
where is the problem? the else?
You have to use a loop to keep asking for an account type if the type is wrong: