Please explain what you mean by "wrong number". What did you enter for the input? If you entered anything other then a 1 or 2 you will get wrong number. Do you have anything else in the program?
From what you posted it should compile and work just fine.
heebleworp wrote:
or change int i; to char i;
I would recommend against this. If you are working with numbers you shouldn't be storing them in a char variable.
Instead like was pointed out in your switch statement change the case labels to test against integers instead of chars. (Hint: Get rid of the ' ')