int a = 100,b = 101,c = 102; double p; p = (a + b + c)/2.0;//改成这样试试!
int a=100,b=101,c=102; double p; p=(a+b+c)/2.0; //或者是 p=(double)(a+b+c)/2;