[HDU] [2004] Score Conversion

Problem Description

Loading...

Problem Analysis

This blog is so hard to use…
Let’s just go with this upload method…
Though using images really is a pain…
As for this problem…
Nothing much to say…

cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include<stdio.h>
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
    if(n<=100&&n>=0)
        {
        if(n<60)
        printf("E\n");
        if(n>=60&&n<70)
        printf("D\n");
        if(n>=70&&n<80)
        printf("C\n");
        if(n>=80&&n<90)
        printf("B\n");
        if(n>=90&&n<=100)
        printf("A\n");
        }
    else
        {
        printf("Score is error!\n");
        }

    }
return 0;
}

Loading...