Advertisement
H0_0H

Untitled

Dec 2nd, 2021
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef long long LL;
  4.  
  5. void fun(int m){
  6.     if (m < 0) printf("分数错误");
  7.     else if (m > 40) printf("分数错误");
  8.     else if (m <= 10) printf("青铜段位");
  9.     else if (m <= 20) printf("白银段位");
  10.     else if (m <= 30) printf("黄金段位");
  11.     else if (m <= 40) printf("钻石段位");
  12. }
  13.  
  14. int main()
  15. {  
  16.   int score = 40;
  17.   fun(score);
  18.   score = 200;
  19.   fun(score);
  20.   return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement