c) 3.万能表头#include 2024.3.6 1.找最大值的方法 (1)ma">

dotcpp刷题心得记录(C++)

2024.3.5

1,控制小数位数方法

( 1.) printf("%7.2f",sum)将sum整数部分保留7位,小数保留2位

(2. ) cout<

//如果不用fixed,直接使用setprecision(int)则表示保留几位有效数字

2.不断输入的方法 while(cin>>c)

3.万能表头#include

2024.3.6

1.找最大值的方法 (1)max函数:max(max(a,b),c) (2)擂台法

(3)sort函数