China MOOC_ 0 Basic Java Language _ 2nd week Judgment _2 Signal report

Source: Internet
Author: User

2

Signal reporting (5 points)

Topic content:

The RS signal report for the radio station is made up of 32 parts:

R (readability) signal resolution is the sharpness.

S (strength) signal strength is the size.

where R is located in the first report, a total of 5 levels, expressed in 1-5 digits.

1---Unreadable

2---Barely readable, occasional words distinguishable

3---Readable with considerable difficulty

4---Readable with practically no difficulty

5---perfectly readable

The second digit of the report is S, which is divided into nine levels, denoted by a number in 1-9

1---faint signals, barely perceptible

2---Very weak signals

3---Weak signals

4---Fair signals

5---fairly good signals

6---good signals

7---Moderately strong signals

8---strong signals

9---extremely strong signals

Now, your program is going to read the numbers in a signal report and then output the corresponding meanings. If you read 59, the output is:

Extremely strong signals, perfectly readable.

Input format:

An integer that signals the report. The 10-bit part of an integer represents the degree of resolution, and the single-digit portion represents strength. The integer range entered is a valid number in [11,59], and numbers outside this range cannot be present in the test data.

Output format:

In a word, it indicates the significance of this signal report. According to the text in the title, first output the text of the intensity, followed by commas and spaces, and then the text to indicate the degree of resolution, followed by the period. Note that the first letter of a sentence with a degree of legibility is lowercase. Note that the punctuation here is in English.

Input Sample:

33

Sample output:

Weak signals, readable with considerable difficulty.

time limit: 500ms memory limit: 32000kb

Import Java.util.scanner;public class Main {public static void main (String args[]) {int x = 0;int readability;//R (Readabi Lity) Signal resolution is the sharpness int strength;//S (strength) signal strength is the size Scanner in = new Scanner (system.in); x = In.nextint (); readability = X/1 0;strength = x 10;switch (strength) {case 1:system.out.print ("faint signals, barely perceptible,"); Break;case 2:System. Out.print ("Very weak signals,") Break;case 3:system.out.print ("weak signals,"); Break;case 4:system.out.print ("Fair Signals, "); Break;case 5:system.out.print (" Fairly good signals, "); Break;case 6:system.out.print (" good signals, "); Break;case 7:system.out.print ("Moderately strong signals,"); Break;case 8:system.out.print ("strong signals,"); break; Case 9:system.out.print ("extremely strong signals,"); Switch (readability) {case 1:system.out.print ("unreadable."); Break;case 2:system.out.print ("Barely readable, occasional words distinguishable."); Break;case 3:system.out.print ("readable with considerable difficulty."); Break;cASE 4:system.out.print ("readable with practically no difficulty."); Break;case 5:system.out.print ("perfectly readable."); Break;}}}

China MOOC_ 0 Basic Java Language _ 2nd week Judgment _2 Signal report

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.