IOException
出学帮帮忙
import java.io.*;
class ky27{
public static void main(String args[])throws IOException {
int c;int a;
System.out.println("输入温度!");
while ((c=(int)System.in.read())!=' ')
switch ( c<10?1:c<25?2:c<35?3:4) {
case 1:
System.out.println(" "+c+"℃ 有点冷。");
break;
case 2:
System.out.println(" "+c+"℃ 正合适。");
break;
case 3:
System.out.println(" "+c+"℃ 有点热。");
break;
default:
System.out.println(" "+c+"℃ 太热了!开空调。");
}
}
}