題目: Print it all
import java.util.Scanner;
public class PrintAll{
public static Scanner sc = new Scanner(System.in);
public static int n,i;
public static void main(String args[]){
while(sc.hasNext()){
n = sc.nextInt();
for(i = 1; i < n; i++){
if(i % 7 != 0){
System.out.print(i + " ");
}
}
System.out.println();
}
}
}
沒有留言:
張貼留言