首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
Cat111
2026年3月3日 13:05
促销计算 题解:
P1091
回复 0
|
赞 14
|
浏览 300
#include<bits\stdc++.h> using namespace std; int main() { double n; while(scanf("%lf",&n)==1) { if(n<1000) printf("discount=1,pay=%g\n",n); else if(n<2000) { double res=n*0.95; printf("discount=0.95,pay=%g\n",res); } else if(n<3000) { ...
mlx
2026年1月29日 21:24
促销计算 题解:
P1091
回复 0
|
赞 19
|
浏览 439
#include<iostream> using namespace std; int main() { double n; while(cin>>n) { if(n<1000) printf("discount=1,pay=%g\n",n); else if(n<2000) { double res=n*0.95; printf("discount=0.95,pay=%g\n",res); } else if(n<3000) { double res=...
mlx
2026年1月29日 21:24
促销计算 题解:
P1091
回复 0
|
赞 3
|
浏览 224
#include<iostream> using namespace std; int main() { double n; while(cin>>n) { if(n<1000) printf("discount=1,pay=%g\n",n); else if(n<2000) { double res=n*0.95; printf("discount=0.95,pay=%g\n",res); } else if(n<3000) { double res=...
曾不会
2026年1月24日 10:32
促销计算 题解:
P1091
回复 0
|
赞 27
|
浏览 442
#include<stdio.h> int main() { double k; while(scanf("%lf",&k)!=EOF) { double i=1; if(k<1000) {...
18919717626
2025年4月28日 19:26
促销计算 题解:
P1091
回复 0
|
赞 12
|
浏览 1.3k
#include<bits/stdc++.h> using namespace std; signed main(){ int pay; while(cin>>pay){ if(pay<1000){ cout<<"discount=1,"<<...
blackbook537
2025年3月15日 20:41
促销计算 题解:
P1091
回复 0
|
赞 51
|
浏览 1.7k
#include<stdio.h> #include<stdlib.h> int main(){ double n; scanf("%lf",&n); if(n<1000){ printf("discount=1,pay=%g",n); }else if(n>=1...
阿灿
2025年3月15日 02:21
促销计算 题解:
P1091
回复 0
|
赞 8
|
浏览 1.1k
#include<bits/stdc++.h> using namespace std; int main(){ float n; while(cin>>n){ if(n <= 1000){ cout<<"discount=1,pay="<<n<<endl; }else if( n <= 2000){ cout<<"discount=0.95,pay="<<n*0.95<<endl; }else if( n <= 3000){...
jisuanji111
2025年2月18日 19:18
促销计算 题解:
P1091
回复 0
|
赞 21
|
浏览 1.7k
注意要按照案例输出格式来输出 #include <bits/stdc++.h> using namespace std; int main(){ double price = 0, discount = 0, pay = 0; while (cin >> price) { if (price >= 5000) { &nb...
hellokitty1679
2024年8月18日 10:11
促销计算 题解:c/c++
P1091
回复 0
|
赞 39
|
浏览 2.7k
#include <bits/stdc++.h> using namespace std; int main(void) { double n; while(scanf("%lf",&n)!=EOF) { if(n>=0&&n<1000) printf("discount=1,pay=%g\n",n)...
Candour
2024年4月22日 22:09
促销计算 题解:
P1091
回复 0
|
赞 8
|
浏览 1.6k
#include<bits/stdc++.h> using namespace std; float x, d, p; int main() { while(cin >> x) { d = 1, p = x; if(x >= 1000 && x < 2000) d = 0.95, p *= d; else if(x >= 2000 && x < 3000) d = 0.9, p *= d; else if(x >= 3000 &...
1
2
题目
促销计算
题解数量
20
发布题解
在线答疑
热门题解
1
促销计算 题解:
2
促销计算 题解:c/c++
3
促销计算 题解:
4
促销计算 题解:
5
促销计算 题解:
6
促销计算 题解:送分
7
促销计算 题解:
8
促销计算 题解:
9
促销计算 题解:
10
促销计算 题解: