cout精确小数点:
//需要导入库文件
cout<<setprecision(n)<<PI<<endl;//这里n指需要精确到的位数
printf精确小数点:
printf("%.n",&PI)//n也指需要精确的位数