摘要:
#include <cstdio>#include <iostream>#include <cmath>#include <algorithm>#include <string>#include <cstring>using namespace std; int health1 = 5, healt 阅读全文
posted @ 2023-08-20 20:30
牛!!!!!!!!!!!!!
阅读(32)
评论(0)
推荐(0)
摘要:
1、类型不一致 例如: p、k为int型,想输出2位小数,需提前转换成double型。 printf("%.2f",(double)p/k); ↑ 阅读全文
posted @ 2023-08-20 20:01
牛!!!!!!!!!!!!!
阅读(10)
评论(0)
推荐(0)
摘要:
排序 #include <iostream>#include <algorithm>using namespace std; int a[10010]; int main(){ int n; cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; 阅读全文
posted @ 2023-08-20 19:05
牛!!!!!!!!!!!!!
阅读(5)
评论(0)
推荐(0)
摘要:
输出: 输入出数 int n; printfr("%d",n); 输出小数 double n=3.14; printfr("%f",n); 输出小数后n数 double a=2.123; printfr("%.nf",a); 输入 int n; scanf("%lf",&n) 阅读全文
posted @ 2023-08-20 17:27
牛!!!!!!!!!!!!!
阅读(11)
评论(0)
推荐(0)

浙公网安备 33010602011771号