猫史档案馆


wycfgqykqlyy

wycfgqykqlyy

Lv.1

I want to ride the wind back, but I'm afraid of

获赞:984收藏:794浏览:2034作品收藏:142

签名:玩暗区突围,极品飞车,三角洲行动,mc的来找我

回复帖子评论
上一页1 页 / 共 1下一页

C++输入符重载,输入数组 中回复

#include<iostream>
#include<iomanip>
using namespace std;
double s;
int n;
int main() {
cin>>n;
cout<<fixed<<setprecision(1);
if(n>=30) {
cout<<n*1.0;
} else {
if(n<=29 && n>=20) {
cout<<n*1.2;
} else {
if(n<=19 && n>=10) {
cout<<n*1.5;
} else {
if(n<10) {
cout<<n*1.8;
}
}
}
}
return 0;
}

 

2023-03-30T15:40:31 点赞:0