Advertisement
plamen27

Special numbers fix

Jul 3rd, 2016
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 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 SpecialNumbers
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. int n = int.Parse(Console.ReadLine());
  15. int asd = 10;
  16.  
  17. for (int i = 1; i < asd; i++)
  18. {
  19. for (int j = 1; j < asd; j++)
  20. {
  21. for (int k = 1; k < asd; k++)
  22. {
  23. for (int l = 1; l < asd; l++)
  24. {
  25.  
  26. if ((n % i == 0) && (n % j == 0) && (n % k == 0) && (n % l == 0))
  27. {
  28. Console.Write("{0}{1}{2}{3} ", i, j, k, l);
  29. }
  30.  
  31.  
  32. }
  33. }
  34. }
  35. }
  36. }
  37.  
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement