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的更多相关文章
随机推荐
- 前端面试:提升web性能
1,减少HTTP请求数 A,从设计实现层简化页面 B,合理设置HTTP缓存 C,资源合并与压缩.如果可以的话,尽可能的将外部脚本,央视进行合并,多个合为一,css,javascript,image都可 ...
- python读写Excel文件_xlrd模块读取,xlwt模块写入
一.安装xlrd模块和xlwt模块(服务器) 1. 下载xlrd模块和xlwt模块 到python官网http://pypi.python.org/pypi/xlrd下载模块.下载的文件例如:xlrd ...
- 使用vs2010编辑Unity脚本,配置方法
在Unity界面上.选择Edit->Preferences->External Tools,External Script Editor一项即为编译器. 以Unity3D 4.3.4 f1 ...
- 【BZOJ3700】发展城市 [LCA][RMQ]
发展城市 Time Limit: 20 Sec Memory Limit: 512 MB[Submit][Status][Discuss] Description 众所周知,Hzwer学长是一名高富 ...
- HDU 1141 Factstone Benchmark (数学 )
题目链接 Problem Description Amtel has announced that it will release a 128-bit computer chip by 2010, a ...
- Mac git
多次提交代码,与合并的工作量成反比. in terminal window git status:查看git的状态 git add -A: 把所有不再track里的文件加入进去/ git add -u ...
- 图像转换为二进制文件存入DSP6748
本文为原创作品,转载请注明出处 欢迎关注我的博客:http://blog.csdn.net/hit2015spring和http://www.cnblogs.com/xujianqing/ 这篇博客主 ...
- PHP HERE DOCUMENT
转自: http://www.codeweblog.com/php%E4%B8%ADheredoc%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95/ Here ...
- python学习笔记 协程
在学习异步IO模型前,先来了解协程 协程又叫做微线程,Coroutine 子程序或者成为函数,在所有语言中都是层级调用,比如a调用b,b调用c.c执行完毕返回,b执行完毕返回,最后a执行完毕返回 所以 ...
- Codeforces 219D Choosing Capital for Treeland 2次DP
//选择一个根使得变换最少边的方向使得能够到达所有点#include <map> #include <set> #include <list> #include & ...