public class one{
	public static void main(String[] args){
		int count=0;
		for(int i=101;i<=200;i++){
			boolean flag=true;
			for(int j=2;j<=(int)Math.sqrt(i);j++){
				
				if(i%j==0){
					flag=false;
					break;
				}
			}
			if(flag){
				count++;
				System.out.println("当前数字"+i+"是质数");
			}
		}
		System.out.println(count);
	}
}
最近下载更多
最代码官方  LV168 2022年12月25日
最近浏览更多
klasjflewf  LV3 2023年8月16日
yongjava21  LV26 2023年1月13日
java小书童  LV18 2023年1月11日
歪头熊猫lalala 2023年1月7日
暂无贡献等级
包呼和  LV10 2023年1月5日
zxc666 2023年1月5日
暂无贡献等级
暂无贡献等级
CrystalQ  LV8 2023年1月4日
阿龙05  LV6 2023年1月4日
wwww1984  LV14 2023年1月2日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友