Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class SpecialNumbers {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- Integer number = Integer.parseInt(scanner.nextLine());
- for (int i = 1; i < 10; i++){
- for(int j = 1; j < 10; j++){
- for(int k = 1; k < 10; k++){
- for(int m = 1; m < 10; m++){
- if(number%i==0 && number%j==0 && number%k==0 && number%m==0){
- System.out.printf("%d%d%d%d ",i,j,k,m);
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment