You get the error because there is a path through the code where the first use of the variable can occur without a value being assigned to it: if the
if
test passes then no value is ever assigned.
The simplest solution is to assign a value when you create the variable:
char Rep = 'n';
But you should stick to naming conventions: local variables should be named in "camelCase" so they start with a lowercase letter:
int num = 4;
int rep = 'n';
Classes, Enums, Properties, and Methods start with uppercase letters but not "local variables"