Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Is this question correctly formulated?
Is this question correctly formulated?
A little mistake leads to the wrong result! ! But barely passed:

int sum = 0; mistake

Replace with:

Double sum = 0.0;

Think about why (totPjz=sum/totCnt)? In addition, if you feel smart, the previous changes are as follows:

totPjz =(double)sum/tot CNT;

This is also wrong. Think again why (the storage capacity of int and double)?