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

个人网站建设作用跨专业的简历怎么制作

个人网站建设作用,跨专业的简历怎么制作,全运网站的建设,建立网站如何赚钱循环结构 文章目录 为什么要学习循环while循环dowhile循环偶数之和断点调试购物结算循环的选择类名和全类名摄氏华氏对照表for循环for执行次序五门功课成绩for的特殊写法break和continue录入客户信息_continue使代码优雅小数的比较不能用或! 为什么要学习循环 在编写代码时或! 为什么要学习循环 在编写代码时业务需求(项目要求)原地打转符合条件结束循环。 马拉松 (操场while循环 public class Demo01 {public static void main(String[] args) {/*while (条件) {循环的体内容;更新条件;}1 到 1005050*/int i 1, sum 0;while (i 100) {sum i;i;}System.out.println(和 sum);} } dowhile循环 public class Demo02 {public static void main(String[] args) {/*do {循环的体内容;更新条件;} while(条件);1 到 1005050*/int i 1, sum 0;do {sum i;i;} while (i 100);System.out.println(和 sum);} } 偶数之和 学员操作一计算100以内的偶数之和 训练要点 while循环结构 程序调试 需求说明 编程实现: 计算100以内 (包括100) 的偶数之和设置断点并调试程序观察每一次循环中变量值的变化public class Demo03 {public static void main(String[] args) {int n 1, sum 0;while (n 100) {if (n % 2 0) sum n;n;}System.out.println(sum: sum);} } 断点调试 购物结算 import java.util.Scanner;public class Demo04 {public static void main(String[] args) {Scanner scanner new Scanner(System.in);System.out.println(购物结算);System.out.println(请选择商品编号);System.out.println(1.T恤 2.网球鞋 3.网球拍);String jx y;while (jx.equals(y)) {System.out.print(请输入商品编号);int select scanner.nextInt();switch (select) {case 1:System.out.println(T恤 100元);break;case 2:System.out.println(网球鞋 200元);break;case 3:System.out.println(网球拍 300元);break;}System.out.print(是否继续y/n);jx scanner.next();}System.out.println(程序结束);} } 循环的选择 import java.util.Scanner;public class Demo05 {public static void main(String[] args) {Scanner scanner new Scanner(System.in);System.out.println(购物结算);System.out.println(请选择商品编号);System.out.println(1.T恤 2.网球鞋 3.网球拍);String jx;do {System.out.print(请输入商品编号);int select scanner.nextInt();switch (select) {case 1:System.out.println(T恤 100元);break;case 2:System.out.println(网球鞋 200元);break;case 3:System.out.println(网球拍 300元);break;}System.out.print(是否继续y/n);jx scanner.next();} while (jx.equals(y));System.out.println(程序结束);} } 类名和全类名 摄氏华氏对照表 public class Demo06 {public static void main(String[] args) {/*使用do-while实现输出 *摄氏温度 与 *华氏温度的对照表要求它从摄氏温度0度到250度每隔20度为一项对照表中的 *条目 不超过10条。转换关系华氏温度 摄氏温度 * 9 / 5.0 3*/double huashidu, sheshidu 0;int count 0;do {huashidu sheshidu * 9 / 5.0 32;System.out.println(sheshidu vs. huashidu);sheshidu 20;count;} while (sheshidu 250 count 10);} } for循环 public class Demo07 {public static void main(String[] args) {/*1 到 1005050特点循环次数固定下来的。建议使用for循环。for (声明初始化循环变量; 条件; 修改循环变量) {循环体;}*/int sum 0;for (int i0; i100; i) {sum i;}System.out.println(和 sum);} } for执行次序 五门功课成绩 import java.util.Scanner;public class Demo08 {public static void main(String[] args) {Scanner scanner new Scanner(System.in);System.out.print(请输入姓名);String name scanner.next(); // 记录姓名int sum 0; // 记录总成绩for (int i1; i5; i) {System.out.print(请输入5门功课的第 i 门的成绩);sum scanner.nextInt();}System.out.println(name 的平均分是 sum / 5.0);} } for的特殊写法 public class Demo09 {public static void main(String[] args) {for (int i0,j6; i6; i,j--) {System.out.println(i j 6);}} }break和continue import java.util.Scanner;public class Demo10 {public static void main(String[] args) {Scanner scanner new Scanner(System.in);int sum 0;for (int i1; i5; i) {System.out.print(成绩);int cj scanner.nextInt();if (cj 0) break; // 结束循环}System.out.println(最后);} } import java.util.Scanner;public class Demo11 {public static void main(String[] args) {Scanner scanner new Scanner(System.in);int sum 0;for (int i1; i5; i) {System.out.print(成绩);int cj scanner.nextInt();if (cj 0) continue; // 忽略当次sum cj;}System.out.println(和 sum);} } 录入客户信息_continue使代码优雅 import java.util.Scanner;public class Demo12 {public static void main(String[] args) {Scanner scanner new Scanner(System.in);System.out.println( 添加客户信息);for (int i1; i3; i) {System.out.print(会员号《4位》);int id scanner.nextInt();if (id 1000 id 9999) { // 满足条件1System.out.print(生日《mm/dd》);String birth scanner.next();if (birth.length() 5) { // 满足条件2System.out.print(积分);int jifeng scanner.nextInt();if (jifeng 0) { // 满足条件3System.out.println(会员信息是\n id \t birth \t jifeng);}}}}System.out.println(程序结束);} } 使用continue import java.util.Scanner;public class Demo13 {public static void main(String[] args) {Scanner scanner new Scanner(System.in);System.out.println( 添加客户信息);for (int i1; i3; i) {System.out.print(会员号《4位》);int id scanner.nextInt();if (id 1000 || id 9999) continue; // 过滤System.out.print(生日《mm/dd》);String birth scanner.next();if (birth.length() ! 5) continue; // 过滤System.out.print(积分);int jifeng scanner.nextInt();if (jifeng 0) continue; // 过滤System.out.println(会员信息是\n id \t birth \t jifeng);}System.out.println(程序结束);} } 小数的比较不能用或! import java.util.Scanner;public class Demo14 {public static void main(String[] args) {final double JINDU 0.00001;/*1. 录入一个小数1小数2小数3。判断小数1小数2是否等于小数3小数是模拟出来的数近似值。无法用 !进行比较的。*/Scanner scanner new Scanner(System.in);System.out.print(小数1);double d1 scanner.nextDouble();System.out.print(小数2);double d2 scanner.nextDouble();System.out.print(小数3);double d3 scanner.nextDouble();if (d1 d2 d3JINDU d1 d2 d3-JINDU) System.out.println(d1d2d3);else System.out.println(d1d2!d3);System.out.println(程序结束);} }
http://wiki.neutronadmin.com/news/75782/

相关文章:

  • 专题探索网站开发模式特点外贸seo搜索优化
  • 几种语言的网站如何做在线制作图片旋转动态
  • dw免费网站模板下载做T恤卖网站
  • 网站推广方法主要有哪几种时代创信网站设计 北京
  • 网站 功能呢html5电影网站模板
  • 互联网招聘网站排行营销网站建设服务
  • 为什么网站上传照片传不上去网站商城建设公司
  • 布谷 海南网站建设网站 宣传册
  • 品牌营销策划网站做广告推广哪个平台好
  • 制作制作网站建设的wordpress 分类图像描述
  • dz网站如何搬家建筑人才招聘哪个网站最好
  • 网站设计的目标是什么网站文章伪原创如何做
  • 免费建站赚钱wordpress整站打包
  • 网站注册域名查询网站做的漂亮的企业
  • 网站打不开是怎么回事手机购物网站模板下载
  • 银川做网站推广创业网站怎么做
  • 东莞制作公司网站会展网站代码源码
  • 美妆网站建设规划企业网络部署方案
  • 长春网站建设哪家好网站排名优化学习
  • 电子商务网站建设参考文献2018无锡网站建设服务
  • tklink的登录做网站为什么在百度搜不到我的网站
  • 招聘设计师去哪个网站苏州调查公司怎么收费
  • 泉州手机网站建设公司wordpress提示框美化
  • 北京通网站建设网络设计参考文献
  • 网站查询备案信息长沙seo代理
  • 网站建设合同要不要交印花税wordpress 图片延迟
  • 免费建设游戏对战平台网站开发一个网站的成本
  • 服务器512m内存做网站南京制作企业网站
  • 网站怎么设关键词合肥企业网站制作公司
  • 银川做企业网站组建小型信息系统网络