标签:bre switch auto bsp new hello ase tin blog
import java.util.Scanner;
public class hello {
public static void main(String[] args) {
// // TODO Auto-generated method stub
System.out.println("请输入四位整数据的国际时间(UTC):");
Scanner in =new Scanner(System.in);
int bjt=in.nextInt();
int utc=0;
int day=0;
String s;
if(bjt>=800)
{
utc=bjt-800;
if(utc>2400)
{
utc=utc-2400;
day=1;
}
}else
{
utc=2400+bjt-800;
day=-1;
}
if(utc<10)
s="0"+utc;
else s=""+utc;
switch(day)
{
case 0:System.out.println("当天"+s);
break;
case -1:System.out.println("前一天"+s);
break;
case 1:System.out.println("后一天"+s);
break;
}
}
}
标签:bre switch auto bsp new hello ase tin blog
原文地址:http://www.cnblogs.com/bcd589/p/6067793.html