Advertisement
nnikolov

Untitled

Mar 22nd, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _10.Special_Numbers
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14.  
  15. for (int i = 1; i <= 9; i++)
  16. {
  17. for (int j = 1; j <= 9; j++)
  18. {
  19. for (int k = 1; k <= 9; k++)
  20. {
  21. for (int m = 1; m <= 9; m++)
  22. {
  23. if (n % i == 0 && n % j == 0 && n % k == 0 && n % m == 0)
  24. {
  25. Console.Write("{0}{1}{2}{3} ", i, j, k, m);
  26. }
  27. }
  28. }
  29. }
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement