Nyoj-score Conversion

Source: Internet
Author: User
Score conversion time limit: 3000 MS | memory limit: 65535 kb difficulty: 1
Description
Enter a percentage system score m to convert it to the corresponding level. The specific conversion rules are as follows:
90 ~ 100 is;
80 ~ 89 is B;
70 ~ 79 is C;
60 ~ 69 is D;
0 ~ 59 is E;
Input
The first line is an integer N, indicating the number of groups of test data (n <10)
Each group of test data occupies one row and is composed of an integer m (0 <= m <= 100 ).
Output
Output a row of input data for each group.
Sample Input
29780
Sample output
AB

Code:

#include<stdio.h>  int main()  {          int T,n; scanf("%d",&T) ;while(T--){    while(~scanf("%d",&n))      {          n=n/10;          if(n<6)          printf("E\n");          else if(n<7)          printf("D\n");          else if(n<8)          printf("C\n");          else if(n<9)          printf("B\n");          else          printf("A\n");      } }    return 0;  }  


Nyoj-score Conversion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.