daily pastebin goal
47%
SHARE
TWEET

Задача 6,3

NikolayPresolski Dec 15th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Java1program;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class ShestTri {
  6.     public static void main(String[] args) {
  7.         Scanner sc = new Scanner(System.in);
  8.         int number = Integer.parseInt(sc.nextLine());
  9.  
  10.         for (int a = 0; a <= 9; a++) {
  11.             for (int b = 0; b <= 9; b++) {
  12.                 for (int c = 0; c <= 9; c++) {
  13.                     for (int d = 0; d <= 9; d++) {
  14.                         for (int e = 0; e <= 9; e++) {
  15.                             for (int f = 0; f <= 9; f++) {
  16.                                 if (a * b * c * d * e * f == number) {
  17.                                     System.out.printf("%d%d%d%d%d%d ", a, b, c, d, e, f);
  18.                                 }
  19.                             }
  20.                         }
  21.                     }
  22.                 }
  23.             }
  24.         }
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top