Advertisement
NadyaMisheva

7.2

Nov 17th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7. int magicnumber = int.Parse(Console.ReadLine());
  8. for(int a = 0; a <=9; a++)
  9. {
  10. for(int b = 0; b <=9; b++)
  11. {
  12. for(int c = 0; c <=9; c++)
  13. {
  14. for(int d = 0; d <=9; d++)
  15. {
  16. for(int e = 0; e <=9; e++)
  17. {
  18. for(int f = 0; f <=9; f++)
  19. {
  20. if (magicnumber == a * b * c * d * e * f )
  21. {
  22. Console.Write("{0}{1}{2}{3}{4}{5} ",a,b,c,d,e,f);
  23. }
  24. }
  25. }
  26. }
  27. }
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement