2020年9月17日

IO流--进行其他文档输入和输出

摘要: public static void main(String[]args){ FileInputStream fis=null; FileOutputStream fos=null; //输入 try { fis = new FileInputStream("java.txt"); //输出 fos 阅读全文

posted @ 2020-09-17 17:15 爱前端的小魏 阅读(163) 评论(0) 推荐(0) 编辑

判断101-200之间有多少个素数,并输出所有素数(2)

摘要: 素数又称为质数,含义是,不能被整数的数都为质数! public static void main(String[]args){ //给出一个数据类型count! int count=0; //使用for循环,只要0-200中的素数,每次+1; for(int i=0;i<=200;++i){ //转 阅读全文

posted @ 2020-09-17 14:39 爱前端的小魏 阅读(547) 评论(0) 推荐(0) 编辑

导航