/*
*需求:打印100中不带7的数字
*/
class Demo
{
public static void main(String[] args)
{
for (int i = 1 ; i<=9 ; i++ )
{
if(i==7) continue;
System.out.println(i);
}
for (int j = 10 ; j<=99 ;j++ )
{
int a = j/10;
int b = j%10;
if( a!=7 && b!=7)
System.out.println(j);
}
System.out.println("100");
}
}
|