- line 3 and 9: where are these being used. If not then remove.
- line 11: initialize all variables - int a = 0, etc
- line 13: bool is good but instead of 0's and 1's try 'false', 'true' instead
- a, b, c as names are OK but more meaningful names are better for the rest - eg 'result', bool bValueFilled instead of B etc, allValuesFilled for R - or whatever you want to call them so the code is readable and self documenting.
- line 55: it might be a good move to print the answer out as well :)
- how come your switch hasn't got a default: case?
- as a matter of style and readability, putting multiple instructions on a line is very bad practice. It makes the code much more readable and checkable to keep it simple. You're not programming in the 1950's with a white coat and nearly no memory.
Otherwise looks OK on a brief test and you're on the right track.