Exercise02_07
import javax.swing.JOptionPane;
public class Years {
public static void main(String[] args){
String mine;
int years,days,mines;
mine=JOptionPane.showInputDialog(null,"输入分钟数");
mines=Integer.parseInt(mine);
years=mines/(60*24*365);
days=mines%(60*24*365)/(60*24);
int messageType=JOptionPane.INFORMATION_MESSAGE;
String message=mines + " minutes is approximately " + years + " years and " + days + " days";
JOptionPane.showMessageDialog(null,message,"result",messageType );
}
}
Exercise02_07的更多相关文章
随机推荐
- eclipse中的debug按钮组突然找不到了,找回方法
- C# new override
A -> virtual Fun B : A -> override Fun C : B -> override Fun D : C -> new virtual Fun E ...
- HDU2057
http://acm.hdu.edu.cn/showproblem.php?pid=2057 涉及到16进制内的加法,可以用%I64x直接来处理,要注意到16进制中负数是用补码来表示的.一个比较困惑的 ...
- jvm面试必会基本知识
内存: 堆区 1.new的对象实例 ps:(java堆可以细分为新生代和老年代)(通过-xmx和-xms来实现可扩展) 虚拟机栈 局部变量 本地方法栈 为虚拟机使用的native方法服务 方法区 s ...
- 【Foreign】无聊的计算姬 [Lucas][BSGS]
无聊的计算姬 Time Limit: 10 Sec Memory Limit: 256 MB Description Input Output Sample Input 6 2 2 3 4 3 2 ...
- MySql binlog(理论篇)
1.什么是binlog? binlog日志用于记录所有更新了数据的sql语句或保存被修改的记录Row: 有了binlog,可以用于实时备份,master/slave主从同步: 在5.0版本前支持文本格 ...
- 也说JS脚本加载控制
问题背景 前端采用的 iframe + html 做后台管理系统.现在js.jquery插件非常多,每次页面都是引用就类似这样: <script src="../Scripts/jqu ...
- [Leetcode Week4]Merge Two Sorted Lists
Merge Two Sorted Lists题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/merge-two-sorted-lists/descrip ...
- Linux设置编译器环境变量
Linux设置编译器环境变量 https://jingyan.baidu.com/article/9f7e7ec0bb22aa6f29155453.html Linux添加环境变量与GCC编译器添加I ...
- DRF基类APIView提供的Request、Response和序列化器的综合使用
关于DRF基类APIView提供的Request和Response对象的作用,可以看我的另一篇博文:https://www.cnblogs.com/chichung/p/9939864.html 综合 ...