首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
blackbook537
2025年3月15日 20:41
促销计算 题解:
P1091
回复 0
|
赞 16
|
浏览 308
#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
|
赞 3
|
浏览 149
#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
|
赞 18
|
浏览 556
注意要按照案例输出格式来输出 #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
|
赞 34
|
浏览 982
#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
|
赞 6
|
浏览 836
#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 &...
emperorT
2024年3月29日 21:49
促销计算 题解:
P1091
回复 0
|
赞 2
|
浏览 809
#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(1000<=n&&n<2000){ cout<<"discount=0.95,pay="<<n*0.95<<endl; }else i...
小酒
2024年3月11日 15:53
促销计算 题解:
P1091
回复 0
|
赞 25
|
浏览 1.3k
1091解题思路 #include <stdio.h> int main() { double x=0; double pay=0; scanf("%lf",&x);//输入花销 if(x<1000) { &n...
williams
2024年3月9日 08:58
促销计算 题解:送分
P1091
回复 0
|
赞 14
|
浏览 1.1k
#include <stdio.h> int main(){ double money; scanf("%lf",&money); if(money>=1000&&money<2000) printf("discount=0.95,pay=%g",money*0.95); else if(money>=2000&&money<3000) printf("discount=0.9,pay=%g",money*0.9); else if(money>=...
1935569240
2024年3月7日 20:16
促销计算 题解:
P1091
回复 0
|
赞 3
|
浏览 665
所以5000以上包括5000? #include<iostream> using namespace std; void print(float discount, float pay) { cout << "discount=" << discount << ",pay=" << pay << endl; } int main() { float n, discount; while (cin >> n) { if (n < 1000) {...
promising
2024年3月3日 20:38
促销计算 题解:
P1091
回复 0
|
赞 2
|
浏览 725
#include<stdio.h> int main() { double count; scanf("%lf",&count); if(0<count&&count<=1000) { printf("discount=1,pay=%g\n",count); &...
1
2
题目
促销计算
题解数量
15
发布题解
在线答疑
热门题解
1
促销计算 题解:c/c++
2
促销计算 题解:
3
促销计算 题解:
4
促销计算 题解:
5
促销计算 题解:送分
6
促销计算 题解:
7
C_用if语句实现
8
Accepted答案-打折(C)
9
1091(提供2种思路)
10
促销计算 题解: