Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long LL;
- void fun(int m){
- if (m < 0) printf("分数错误");
- else if (m > 40) printf("分数错误");
- else if (m <= 10) printf("青铜段位");
- else if (m <= 20) printf("白银段位");
- else if (m <= 30) printf("黄金段位");
- else if (m <= 40) printf("钻石段位");
- }
- int main()
- {
- int score = 40;
- fun(score);
- score = 200;
- fun(score);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement