JAVA第一周,信号报告

import java.util.Scanner;


import javax.swing.plaf.synth.SynthStyle;


public class Main {


public static void main(String[] args) {
// TODO Auto-generated method stub
int a;
Scanner in = new Scanner(System.in);
a=in.nextInt();
switch(a%10)
{
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, ");break;
}
switch(a/10)
{
case 1:System.out.println("unreadable.");break;
case 2:System.out.println("barely readable, occasional words distinguishable.");break;
case 3:System.out.println("readable with considerable difficulty.");break;
case 4:System.out.println("readable with practically no difficulty.");break;
case 5:System.out.println("perfectly readable.");break;
}
}

}

你可能感兴趣的:(JAVA第一周,信号报告)