Embercode
✕
ConditionalsCoding problems

Conditionals: coding problems

Write a program that reads the input and prints the answer. Run checks it against every test, including hidden ones.

0 of 7 solved

  • Your school prints a letter grade on every report card. Ayesha's teacher gives her a score out of 100, and the report card needs one letter. The bands are: 90 to 100 is A, 80 to 89 is B, 70 to 79 is C, 60 to 69 is D, and 0 to 59 is F.

    Read one whole number and print the letter.

    **Constraints:** 0 <= score <= 100.

    Input. One integer: the score.

    Output. One letter: A, B, C, D or F.

    Example 1 input

    84
    

    Output

    B
    

    Example 2 input

    59
    

    Output

    F