例如:將3666秒轉換成1時1分6秒
public static void main() {
int seconds = 3666;
int h = seconds / 3600;
int m = seconds % 3600 / 60;
int s = seconds % 60;
System.put.print(h + "時" + m + "分" + s + "秒");
}
例如:將3666秒轉換成1時1分6秒
public static void main() {
int seconds = 3666;
int h = seconds / 3600;
int m = seconds % 3600 / 60;
int s = seconds % 60;
System.put.print(h + "時" + m + "分" + s + "秒");
}