Branch-06. Score Conversion

Source: Internet
Author: User

This question requires programming to convert a percentage to a five-digit score. Conversion rules:

    • If the value is greater than or equal to 90, it is divided into;
    • B is smaller than 90 and greater than or equal to 80;
    • Less than 80 and greater than or equal to 70 is C;
    • Less than 70 and greater than or equal to 60 is D;
    • Less than 60 is E.

      Input Format:Enter the percentage score of 1 integer in a row.

      Output Format:Output the corresponding five-digit score in one row.

      Input sample: 90
      Output example:A
 Import  Java. util. vendor;  Public   Class  Main {  Public   Static  Void  Main (string [] ARGs) {score = New  Using (system. In );  Int S = Score. nextint ();  If (S> = 90 ) System. Out. Print ( "" );  Else  {  If (S> = 80 ) System. Out. Print ( "B");  Else  {  If (S> = 70 ) System. Out. Print ( "C" );  Else  {  If (S> = 60 ) System. Out. Print ( "D" );  Else System. Out. Print ("e");}}}}} 

 

Branch-06. 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.