package com.fqs.test; import java.util.Scanner; public class hello { public static void main(String[] args) { //循环中 逢7过 Scanner sc=new Scanner(System.in); System.out.println("请输入一个1到100之间的整数"); int num=sc.nextInt(); while(num<0 ||num>100){ System.out.println("不合法,请输入1到100之间的数"); } for(;num<=100;num++){ if(num%7==0||num%10 ==7||num/10==7){ continue; } System.out.println("num:"+num); } } }
标签:Scanner,50,System,num,println,public,out From: https://www.cnblogs.com/haha1988/p/17460321.html