intAmountA = TxtAmountA.Text;
intAmountB = TxtAmountB.Text;
intAmountC = TxtAmountC.Text;
You are assigning string type values to an int type variable.
This will convert the string values into their int type representations.
e.g. "1" => 1
intAmountA = int.Parse(TxtAmountA.Text);
intAmountB = int.Parse(TxtAmountB.Text);
intAmountC = int.Parse(TxtAmountC.Text);