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的更多相关文章
随机推荐
- saltshaker填坑
参考资料: https://github.com/yueyongyue/saltshaker http://blog.sina.com.cn/s/blog_b21312340102whzw.html ...
- bzoj 2426 【HAOI2010】工程选址 贪心
[HAOI2010]工厂选址 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 447 Solved: 308[Submit][Status][Disc ...
- Java super和this
this this是自身的一个对象,代表对象本身,可以理解为:指向对象本身的一个指针. this的用法在java中大体可以分为3种: 1.普通的直接引用 这种就不用讲了,this相当于是指向当前对象本 ...
- 修改firefox默认下载路径
菜单栏---编辑---首选项--在常规页就可以看到下载设置了
- Xcode5根控制器使用xib展示的步骤
#error:Xcode5根控制器使用xib展示,步骤 ⓵取消mainInterface ⓶右击file's owner对xib进行view-view连线,否则: Terminating app du ...
- LeetCode 151 reverse word in a string
Given an input string, reverse the string word by word. For example, Given s = "the sky is blue ...
- python学习笔记 异步asyncio
asyncio是Python 3.4版本引入的标准库,直接内置了对异步IO的支持. asyncio的编程模型就是一个消息循环.我们从asyncio模块中直接获取一个EventLoop的引用,然后把需要 ...
- 关于测试url传值的问题
url1:http://localhost:8080/fms/finan/isRiskCustomer.action?customername="xxxxxxxx"; 如上这样写, ...
- 【Android开发日记】之入门篇(十四)——Button控件+自定义Button控件
好久不见,又是一个新的学期开始了,为什么我感觉好惆怅啊!这一周也发生了不少事情,节假日放了三天的假(好久没有这么悠闲过了),实习公司那边被组长半强制性的要求去解决一个后台登陆的问题,结果就是把 ...
- 【SQL】全关系操作
1.消除重复 - DISTINCT SQL语句中默认的是,重复的元祖可以多次的显示.如果希望消除重复,需要DISTINCT关键字. 注:消除重复需要排序,所以代价高.在需要高效率时要谨慎. SELEC ...