Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int x = 1;
- string print = "";
- for (int i1 = 1; i1 < 10; i1++)
- {
- for (int i2 = 1; i2 < 10; i2++)
- {
- for (int i3 = 1; i3 < 10; i3++)
- {
- for (int i4 = 1; i4 < 10; i4++)
- {
- for (int i5 = 1; i5 < 10; i5++)
- {
- for (int i6 = 0; i6 < 10; i6++)
- {
- x = i1 * i2 * i3 * i4 * i5 * i6;
- if (x == n)
- {
- print = print + i1 + i2 + i3 + i4 + i5 + i6 + " ";
- }
- }
- }
- }
- }
- }
- }
- Console.WriteLine(print);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement