当前位置: 首页 > news >正文

什么叫网站优化郑州机械网站制作

什么叫网站优化,郑州机械网站制作,家在深圳论坛业主论坛,wordpress 媒体库图片JAVA基础题目练习 1. 键盘录入数据#xff0c;比较大小2. 代码重构#xff08;简化代码#xff0c;少做判断#xff09;3. 键盘录入月份的值#xff0c;输出对应的季节4. 获取三个数据中的最大值使用IF语句5. 用switch语句实现键盘录入月份#xff0c;输出对应的季节6. 求… JAVA基础题目练习 1. 键盘录入数据比较大小2. 代码重构简化代码少做判断3. 键盘录入月份的值输出对应的季节4. 获取三个数据中的最大值使用IF语句5. 用switch语句实现键盘录入月份输出对应的季节6. 求出1-100之间奇数和7. 求5的阶乘8. 在控制台输出所有的”水仙花数”9. 在控制台输出满足如下条件的五位数10. 统计1-1000之间同时满足如下条件的数据有多少个11. 在控制台输出九九乘法表12. 综合题目 1. 键盘录入数据比较大小 // 键盘录入数据比较大小/*键盘录入两个数据获取这两个数据中的最大值键盘录入三个数据获取这三个数据中的最大值键盘录入两个数据比较这两个数据是否相等*/Scanner scanner new Scanner(System.in);System.out.println(请输入a1);int a1 scanner.nextInt();System.out.println(请输入a2);int a2 scanner.nextInt();System.out.println(请输入a3);int a3 scanner.nextInt();int maxNum 0;maxNum (a1 a2) ? (a1 a3 ? a1 : a3) : (a2 a3 ? a2 : a3);System.out.println(最大的值为 maxNum);if (a1 a2) {System.out.println(a1等于a2);}if (a1 a3) {System.out.println(a1等于a3);}if (a2 a3) {System.out.println(a2等于a3);}System.out.println(-------------------------------------------------); 2. 代码重构简化代码少做判断 /*if (age 0 | age 150)System.out.println(成精了...);else if (age 18)System.out.println(该用户未成年..);elseSystem.out.println(该用户成年了..);if(age 18); //表示什么都不做代码重构*/System.out.println(请输入age:);int age scanner.nextInt();if (age 0 age 18) {System.out.println(未成年);} else if (age 18 age 150) {System.out.println(已成年);} else {System.out.println(年龄错误);}System.out.println(-------------------------------------------------); 3. 键盘录入月份的值输出对应的季节 System.out.println(请输入月份:);int mounth scanner.nextInt();if (mounth 3 mounth 5) {System.out.println(春);} else if (mounth 5 mounth 8) {System.out.println(夏);} else if (mounth 8 mounth 11) {System.out.println(秋);} else if (mounth 12 || (mounth 1 mounth 3)) {System.out.println(冬);} else {System.out.println(月份错误);}4. 获取三个数据中的最大值使用IF语句 if (a1 a2) {if (a1 a3) {System.out.println(最大的值为a1 a1);} else {System.out.println(最大的值为a3 a3);}} else {if (a2 a3) {System.out.println(最大的值为a2 a2);} else {System.out.println(最大的值为a3 a3);}}5. 用switch语句实现键盘录入月份输出对应的季节 /*用switch语句实现键盘录入月份输出对应的季节*/switch (mounth) {case 1:System.out.println(冬);break;case 2:System.out.println(冬);break;case 3:System.out.println(春);break;case 4:System.out.println(春);break;case 5:System.out.println(春);break;case 6:System.out.println(夏);break;case 7:System.out.println(夏);break;case 8:System.out.println(夏);break;case 9:System.out.println(秋);break;case 10:System.out.println(秋);break;case 11:System.out.println(秋);break;case 12:System.out.println(冬);break;}6. 求出1-100之间奇数和 System.out.println(请输入n来计算1-n之间的奇数和);int n scanner.nextInt();int sum 0;for (int i 1; i n; i) {if (i % 2 ! 0) {sum i;}}7. 求5的阶乘 System.out.println(1-n之间的奇数和为 sum);System.out.println(请输入m来计算m的阶乘);int m scanner.nextInt();int mlt 1;for (int i 1; i m; i) {mlt * i;}System.out.println(m的阶乘为 mlt);8. 在控制台输出所有的”水仙花数” /*在控制台输出所有的”水仙花数”所谓的水仙花数是指一个三位数其各位数字的立方和等于该数本身。举例153就是一个水仙花数。153 1*1*1 5*5*5 3*3*3*/for (int i 100; i 1000; i) {int bai 0;int shi 0;int ge 0;bai i / 100;shi (i / 10) % 10;ge i % 10;if (i (bai * bai * bai shi * shi * shi ge * ge * ge)) {System.out.println(i 是水仙花数);}}9. 在控制台输出满足如下条件的五位数 /*请在控制台输出满足如下条件的五位数个位等于万位十位等于千位个位十位千位万位百位*/for (int i 10000; i 100000; i) {int ge 0, shi 0, bai 0, qian 0, wan 0;ge i % 10;shi (i / 10) % 10;bai (i / 100) % 10;qian (i / 1000) % 10;wan (i / 10000) % 10;if (gewan shiqian (geshiqianwanbai)){System.out.println(i 满足条件);}}10. 统计1-1000之间同时满足如下条件的数据有多少个 /*请统计1-1000之间同时满足如下条件的数据有多少个对3整除余2对5整除余3对7整除余2*/for (int i 1;i1000;i){if (i%32 i%53 i%72){System.out.println(i满足条件);}} 11. 在控制台输出九九乘法表 /*// 需求在控制台输出九九乘法表*/for(int i1;i9;i){for(int j1;ji;j){System.out.print(i*j(i*j)\t);}System.out.println();}12. 综合题目 小芳的妈妈每天给她2.5元钱她都会存起来但是每当这一天是存钱的第5天或者5的倍数的话她都会花去6元钱 请问经过多少天小芳才可以存到100元钱。 float money 0;int day 0;while(money!100) {day 1;money 2.5;if (money100){break;}if (day 5 | day % 5 0) {money - 6;}}System.out.println(需要存day天存款为money);
文章转载自:
http://www.morning.czgfn.cn.gov.cn.czgfn.cn
http://www.morning.xkmrr.cn.gov.cn.xkmrr.cn
http://www.morning.dzqyn.cn.gov.cn.dzqyn.cn
http://www.morning.yxlhz.cn.gov.cn.yxlhz.cn
http://www.morning.gkjyg.cn.gov.cn.gkjyg.cn
http://www.morning.zdtfr.cn.gov.cn.zdtfr.cn
http://www.morning.ghwdm.cn.gov.cn.ghwdm.cn
http://www.morning.kyhnl.cn.gov.cn.kyhnl.cn
http://www.morning.cwpny.cn.gov.cn.cwpny.cn
http://www.morning.gkgb.cn.gov.cn.gkgb.cn
http://www.morning.mpmtz.cn.gov.cn.mpmtz.cn
http://www.morning.mwbqk.cn.gov.cn.mwbqk.cn
http://www.morning.jppdk.cn.gov.cn.jppdk.cn
http://www.morning.gkdhf.cn.gov.cn.gkdhf.cn
http://www.morning.hkswt.cn.gov.cn.hkswt.cn
http://www.morning.wtcyz.cn.gov.cn.wtcyz.cn
http://www.morning.hmmnb.cn.gov.cn.hmmnb.cn
http://www.morning.cjrmf.cn.gov.cn.cjrmf.cn
http://www.morning.sjqpm.cn.gov.cn.sjqpm.cn
http://www.morning.kmprl.cn.gov.cn.kmprl.cn
http://www.morning.tfkqc.cn.gov.cn.tfkqc.cn
http://www.morning.drpbc.cn.gov.cn.drpbc.cn
http://www.morning.drspc.cn.gov.cn.drspc.cn
http://www.morning.mggwr.cn.gov.cn.mggwr.cn
http://www.morning.pwxkn.cn.gov.cn.pwxkn.cn
http://www.morning.rpsjh.cn.gov.cn.rpsjh.cn
http://www.morning.rdqzl.cn.gov.cn.rdqzl.cn
http://www.morning.nhzxd.cn.gov.cn.nhzxd.cn
http://www.morning.zzqgc.cn.gov.cn.zzqgc.cn
http://www.morning.rflcy.cn.gov.cn.rflcy.cn
http://www.morning.bhpsz.cn.gov.cn.bhpsz.cn
http://www.morning.fllx.cn.gov.cn.fllx.cn
http://www.morning.lxfyn.cn.gov.cn.lxfyn.cn
http://www.morning.ksggl.cn.gov.cn.ksggl.cn
http://www.morning.bplqh.cn.gov.cn.bplqh.cn
http://www.morning.krtcjc.cn.gov.cn.krtcjc.cn
http://www.morning.zqdzg.cn.gov.cn.zqdzg.cn
http://www.morning.qsy39.cn.gov.cn.qsy39.cn
http://www.morning.jhqcr.cn.gov.cn.jhqcr.cn
http://www.morning.tkxyx.cn.gov.cn.tkxyx.cn
http://www.morning.hnhgb.cn.gov.cn.hnhgb.cn
http://www.morning.hrhwn.cn.gov.cn.hrhwn.cn
http://www.morning.rymb.cn.gov.cn.rymb.cn
http://www.morning.xkhxl.cn.gov.cn.xkhxl.cn
http://www.morning.fhykt.cn.gov.cn.fhykt.cn
http://www.morning.wlgpz.cn.gov.cn.wlgpz.cn
http://www.morning.qrsm.cn.gov.cn.qrsm.cn
http://www.morning.dmsxd.cn.gov.cn.dmsxd.cn
http://www.morning.tdhxp.cn.gov.cn.tdhxp.cn
http://www.morning.pkwwq.cn.gov.cn.pkwwq.cn
http://www.morning.bqhlp.cn.gov.cn.bqhlp.cn
http://www.morning.gyylt.cn.gov.cn.gyylt.cn
http://www.morning.zrbpx.cn.gov.cn.zrbpx.cn
http://www.morning.ndtmz.cn.gov.cn.ndtmz.cn
http://www.morning.zcxjg.cn.gov.cn.zcxjg.cn
http://www.morning.bpmfr.cn.gov.cn.bpmfr.cn
http://www.morning.khxwp.cn.gov.cn.khxwp.cn
http://www.morning.kwjyt.cn.gov.cn.kwjyt.cn
http://www.morning.dhbyj.cn.gov.cn.dhbyj.cn
http://www.morning.fmdvbsa.cn.gov.cn.fmdvbsa.cn
http://www.morning.pcqxr.cn.gov.cn.pcqxr.cn
http://www.morning.dnqlba.cn.gov.cn.dnqlba.cn
http://www.morning.jfjpn.cn.gov.cn.jfjpn.cn
http://www.morning.bfsqz.cn.gov.cn.bfsqz.cn
http://www.morning.mrxqd.cn.gov.cn.mrxqd.cn
http://www.morning.htmhl.cn.gov.cn.htmhl.cn
http://www.morning.tnkwj.cn.gov.cn.tnkwj.cn
http://www.morning.sbqrm.cn.gov.cn.sbqrm.cn
http://www.morning.lkbkd.cn.gov.cn.lkbkd.cn
http://www.morning.qmrsf.cn.gov.cn.qmrsf.cn
http://www.morning.mjzgg.cn.gov.cn.mjzgg.cn
http://www.morning.yxwcj.cn.gov.cn.yxwcj.cn
http://www.morning.krtcjc.cn.gov.cn.krtcjc.cn
http://www.morning.nzwp.cn.gov.cn.nzwp.cn
http://www.morning.jcxyq.cn.gov.cn.jcxyq.cn
http://www.morning.bnlkc.cn.gov.cn.bnlkc.cn
http://www.morning.tkztx.cn.gov.cn.tkztx.cn
http://www.morning.gwkjg.cn.gov.cn.gwkjg.cn
http://www.morning.prkdl.cn.gov.cn.prkdl.cn
http://www.morning.xxsrm.cn.gov.cn.xxsrm.cn
http://www.tj-hxxt.cn/news/267603.html

相关文章:

  • 怎么做图片展示网站wordpress xml文件
  • 温江网站制作网站营销看法
  • 腾讯云服务器用什么软件做网站用仿站工具做网站
  • wordpress 搭建多站点app程序定制开发
  • 中国建设教育网官方网站发行商城小程序
  • 无锡市建设工程质监站网站网站做的像会侵权吗
  • 茶叶企业建设网站起飞页怎么做网站
  • 固镇建设局网站兰州网站建设哪家公司好
  • 电商网站建设模板怎么利用网络挣钱
  • 国内网站制作特点佛山刚刚发生的事
  • 网站后台添加不了图片wordpress设置标题字体
  • 网站功能描述与分析网络广告的形式
  • 政务网站建设标准做网站以前出名的公司
  • 成都市建设局官方网站长治企业网站建设
  • 简述网站的设计流程app制作软件破解版
  • 网站分屏布局设计微网站搭建
  • 网站开发先写后端先写前端上海十大公关公司排名
  • 做网站排在前十名要多少钱济南华企立方 网站
  • 建设金融网站哪家好wordpress重复文章
  • 全国送花网站产品线上推广方式都有哪些
  • asp网站建设 文献网页设计软件dream
  • 东莞设计公司网站导航网站 cms
  • p2p网站建设要多少钱青县网站建设公司
  • 网站目录权限外贸订单
  • 哈尔滨企业自助建站系统网站改版301是什么意思
  • 营销型网站建设宣传语seo顾问招聘
  • 网站备案怎么找人备扁平化网页设计图片
  • 网站右下角代码wordpress主题 开发
  • 刚做优化的网站什么能更新个人网站模板html
  • 搜索引擎网站模板1122t