=(1 +4+5)/3 =10/3 =3.3333 Instead of this 3.3333 the output will be 3. This is because if both operands are integers an integer division will be occurred, that is the fractional part will be truncated.
To get the correct out put do as follows
case 1: int a,b,c; is replaced by float a,b,c;
OR
case 2: Replace (a+b+c)/3 by (a+b+c)/3.0;
OR
case 3: Type casting. Replace avg=(a+b+c)/3; by avg=(float)(a+b+c)/3;