C-Score Conversion

Source: Internet
Author: User

Time limit:1000MS Memory Limit:32768KB 64bit IO Format:%i64d &A mp %i64u

Description

Enter a percentile score T and convert it to a corresponding level, with the following specific conversion rules:90~ 100 is A;   80~ 89 is b;   70~ 79 is C;   60~ 69 is D; 0~ 59 is e;

Input

There are multiple sets of input data, one for each group, and an integer.

Output

For each set of input data, output one line. If the input data is not 0~100 in the range, output one line: "Score is error!".

Sample Input

Sample Output

Edascore is error!
Multiple judgments, attention to conditional limits and format output
#include <stdio.h>intMain () {intx;  while(SCANF ("%d", &x)! =EOF) {        if(x> -)
printf"score is error!\n"); Else if
(x>= -) printf ("a\n"); Else if
(x>= the) printf ("b\n"); Else If
(x>= -) printf ("c\n"); Else if
(x>= -) printf ("d\n"); Else if
(x>=0) printf ("e\n"); Else
printf"score is error!\n"); } return 0;}

C-Score Conversion

Related Article

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.