第三次Java练习题解析.pdfVIP

  • 0
  • 0
  • 约1.91万字
  • 约 16页
  • 2022-06-28 发布于山西
  • 举报
1. 顺序语句练习 6道题.方法1 道.数组2 道。类2 到 建项目Test+学号 每个题一个包 把每个项目压缩 专业班级学号姓名 提交 时间 3 小时 数组: 做题号为偶数的 去掉柜子 八皇后 方法 :1 3 11 13 14 16 类: 1 5 4 6 7 8 9 14 15 16 异常: .循环练习 public class lx5 { public static void main(String args[]){ System.out.println(50 以内的素数:); System.out.print(2 +3 ); int c=2; for(int i=3;i=100;i++) for(int j=2;j=(int)Math.sqrt(i);j++){ if(i%j==0)break; if(j=(int)Math.sqrt(i)){ System.out.print(i+ ); c++;

文档评论(0)

1亿VIP精品文档

相关文档