The specific ideas are as follows:
Multiply this number by 100 to make the third place after the decimal point the first place;
The rounding of C language is a community decimal, not a rounding. At this time, adding 0.5 to the number can achieve the rounding effect without calling any rounding function.
The implementation code and comments are as follows:
Invalid? Master ()
{
Double? num = 3. 14 159; ? //Here we use the value distance of pi.
num=? (int)(num * 100+0.5); ? //Multiply by 100+0.5 and round it off.
printf("%.3lf ",num); ? //output results
}