摘要: 1.编写一个简单程序,要求数组长度为5,静态赋值10,20,30,40,50,在控制台输出该数组的值。 2.package tet; 3. 4.public class one { 5. 6. /** 7. * @param args 8. */ 9. public static void main 阅读全文
posted @ 2021-04-20 11:33 空? 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 上机练习:1.使用for循环计算1-100的和,除了以3结尾的那些数 package tes; public class Test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generat 阅读全文
posted @ 2021-04-13 14:46 空? 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 上机练习 1.分别使用for循环,while循环,do循环求1到100之间所有能被3整除的整数的和。(知识点:循环语句) package text; public class text { /** * @param args */ public static void main(String[] a 阅读全文
posted @ 2021-04-06 22:38 空? 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1.输入一个年份,判断是不是闰年(能被4整除但不能被100整除,或者能被400整除) package zuiye;import java.util.Scanner;public class text { /** * @param args */ public static void main(Str 阅读全文
posted @ 2021-03-29 20:53 空? 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 1.输入商品单价,数量,求总价。活动8折后抹零,计算活动价。输入付款金额,计算找零并输出 package zuiye; import java.util.Scanner; public class text { /** * @param args */ public static void main 阅读全文
posted @ 2021-03-29 20:26 空? 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 1.编写一个程序,定义圆的半径,求圆的面积. public class Test3 { /** * @param args */ public static void main(String[] args) { int r=5; double pi=3.14; System.out.println( 阅读全文
posted @ 2021-03-12 09:55 空? 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1.输出学号班级和姓名 public class Test1 { /** * @param args */ public static void main(String[] args) { System.out.println("193230326计算机1903魏巾凯"); } } 2.输出以下图形 阅读全文
posted @ 2021-03-07 22:03 空? 阅读(44) 评论(0) 推荐(0) 编辑