public class Demo2 {
public static final String[] TIME=new String[]{"天","时","分","秒"};
public static final int[] TIME_GET=new int[]{24*60*60,60*60,60};
/**
* @param args
*/
public static void main(String[] args) {
String str=Tool.readFrom("请输入你要打印的数字");
System.out.println(Time(Integer.parseInt(str)));
}
// TODO Auto-generated method stub
public static String Time(int num){
String str="";
for(int i=0;i<TIME.length;i++){
int t=num/TIME_GET[i];
str+=t+TIME[i];
num=num%TIME_GET[i];
}