Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int magicnumber = int.Parse(Console.ReadLine());
- for(int a = 0; a <=9; a++)
- {
- for(int b = 0; b <=9; b++)
- {
- for(int c = 0; c <=9; c++)
- {
- for(int d = 0; d <=9; d++)
- {
- for(int e = 0; e <=9; e++)
- {
- for(int f = 0; f <=9; f++)
- {
- if (magicnumber == a * b * c * d * e * f )
- {
- Console.Write("{0}{1}{2}{3}{4}{5} ",a,b,c,d,e,f);
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement