{
int human2;
int cat;
human2 = Convert.ToInt16(TextBox.Text);
cat = Convert.ToInt16(CatAnswer.Text);
switch (human2)
{
case 1 :
if (human2 == 1)
cat = 15;
break;
case 2 :
if (human2 == 2)
cat = 25;
break;
case 3 :
if (human2 > 2)
cat = 25 + (human - 2) * 4;
break;
}
}
private void DogButton_Click(object sender, RoutedEventArgs e)
{
int human;
int dog;
human = Convert.ToInt16(TextBox.Text);
dog = Convert.ToInt16(DogAnswer.Text);
switch (human)
{
case 1 :
if (human < 2)
dog = human * 11;
DogAnswer.Text = Convert.ToString(dog);
break;
case 2 :
if (human > 2)
dog = 22 + (human - 2) * 4;
DogAnswer.Text = Convert.ToString(dog);
break;
}
}