java 秒换算
importjava.io.*;classass{publicstaticvoidmain(String[]args)throwsjava.io.IOException{...
import java.io.*;
class ass {
public static void main(String[] args)
throws java.io.IOException {
String x;
int value;
int hour;
int minute;
int second;
int s = 60;
int t = 3600;
System.out.println("원하는 숫자를 임력하세요");
InputStreamReader ddd = new InputStreamReader(System.in);
BufferedReader buff = new BufferedReader(ddd);
x = buff.readLine();
value = Integer.parseInt(x);
minute = value /s ;
hour = minute / t;
second = value % s;
System.out.println(hour + "hour" + minute + "mintue" + second + "second");
}
}
我做的,但是最后怎么也算不出来小时还有天。。。请会的仁兄~帮下~再下感激不尽~~~~~~!!!! 展开
class ass {
public static void main(String[] args)
throws java.io.IOException {
String x;
int value;
int hour;
int minute;
int second;
int s = 60;
int t = 3600;
System.out.println("원하는 숫자를 임력하세요");
InputStreamReader ddd = new InputStreamReader(System.in);
BufferedReader buff = new BufferedReader(ddd);
x = buff.readLine();
value = Integer.parseInt(x);
minute = value /s ;
hour = minute / t;
second = value % s;
System.out.println(hour + "hour" + minute + "mintue" + second + "second");
}
}
我做的,但是最后怎么也算不出来小时还有天。。。请会的仁兄~帮下~再下感激不尽~~~~~~!!!! 展开
4个回答
展开全部
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class ass {
public static void main(String[] args) throws IOException {
String x;
int value;
int day;
int hour;
int minute;
int second;
int s = 60;
int t = 3600;
int d = 3600 * 24;
System.out.println("원하는 숫자를 임력하세요");
InputStreamReader ddd = new InputStreamReader(System.in);
BufferedReader buff = new BufferedReader(ddd);
x = buff.readLine();
value = Integer.parseInt(x);
// minute = value / s;
// hour = minute / t;
// second = value % s;
second = value % s;
minute = value % t / s;
hour = value % d / t;
day = value / d;
System.out.println(day + "day " + hour + "hour " + minute + "mintue "
+ second + "second");
}
}
import java.io.IOException;
import java.io.InputStreamReader;
public class ass {
public static void main(String[] args) throws IOException {
String x;
int value;
int day;
int hour;
int minute;
int second;
int s = 60;
int t = 3600;
int d = 3600 * 24;
System.out.println("원하는 숫자를 임력하세요");
InputStreamReader ddd = new InputStreamReader(System.in);
BufferedReader buff = new BufferedReader(ddd);
x = buff.readLine();
value = Integer.parseInt(x);
// minute = value / s;
// hour = minute / t;
// second = value % s;
second = value % s;
minute = value % t / s;
hour = value % d / t;
day = value / d;
System.out.println(day + "day " + hour + "hour " + minute + "mintue "
+ second + "second");
}
}
展开全部
minute = value % t / s;
hour = value / t;
second = value % s;
hour = value / t;
second = value % s;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
完全看不懂你的题是啥意思,说明白点
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询