To solve your problem remove the '' from the case values.
switch( name2 ) {
case 1:
++aCount;
break;
case 2:
++bCount;
break;
case 3:
++cCount;
break;
case 4:
++fCount;
break;
}
May I suggest you merge the if- and switch-statement.
if (name >= 90)
{
++aCount;
}
else if (name >= 80)
{
++bCount;
}
else if (name >= 70)
{
++cCount;
}
else if (name <= 69)
{
++fCount;
}