Exercise02_11
import javax.swing.JOptionPane;
public class Population{
public static void main(String[] args){
int sum,s,years;
String number;
number = JOptionPane.showInputDialog(null,"Enter the number of years:");
years=Integer.parseInt(number);
s=365*years*24*60*60;
sum=312032486+s/7-s/13+s/45;
int messageType=JOptionPane.INFORMATION_MESSAGE;
String message="The population in " + years + " is " + sum;
JOptionPane.showMessageDialog(null,message,"result",messageType );
}
}
Exercise02_11的更多相关文章
随机推荐
- 数据仓库3级范式(3NF)基础
一.引言 最近在整理理大数据模式下的数据仓库数据模型,资料来自互联网和读过的数据仓库理论和实践相关. 二.3NF (1)1NF-无重复的列 数据库表的每一列都是不可分割的基本数据项,同一列中不能有多个 ...
- HDU1013 Digital Roots
http://acm.hdu.edu.cn/showproblem.php?pid=1013 #include<iostream> #include "cstdio" ...
- 51nod加农炮
这道题维护一下前缀最大值然后二分答案就好了哇 233 #include<cstdio> #include<cstring> #include<algorithm> ...
- bzoj 1251 裸splay
裸的splay,只需要注意 max[-1]:=-maxlongint 就行了,否则在update的时候子节点的 max值会在max[-1]里选 /*************************** ...
- Linux内核线程之深入浅出【转】
转自:http://blog.csdn.net/yiyeguzhou100/article/details/53126626 [-] 线程和进程的差别 线程的分类 1 内核线程 2 轻 ...
- PL/SQL 04 游标 cursor
--游标 declare cursor 游标名字 is 查询语句;begin 其他语句;end; --游标的属性%FOUND%NOTFOUND%ISOPEN%ROWCOUNT(当前游标的指针位 ...
- Spark优化之一:分布式下的map操作是闭包
例如对一个JavaPairRDD<String, String>做遍历操作,常见的,我们可以通过先通过collect()操作将它转化为Map对象再进行遍历,也可以使用Spark提供的map ...
- Javascript制作放大镜
方法一 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- ubuntu16.04下fcitx无法在QT Creator输入中文解决办法
我的博客新地址:www.liuquanhao.com ------------------------------------------------------ Qt creator无法用fcitx ...
- oracle创建用户赋予权限,删除权限
--删除用户及及用户下的所有数据 drop user xxx cascade; --创建用户赋予密码 ; --赋予权限 grant dba to xxx; --删除权限 revoke dba from ...