Advertisement
Guest User

Untitled

a guest
Dec 19th, 2017
1,511
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 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 zadacha6
  8. {
  9. class zadacha6
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int m = int.Parse(Console.ReadLine());
  15.  
  16. int f4 = n % 10;
  17. int f3 = (n / 10) % 10;
  18. int f2 = (n / 100) % 10;
  19. int f1 = (n / 1000)%10;
  20.  
  21. int h4 = m % 10;
  22. int h3 = (m / 10) % 10;
  23. int h2 = (m / 100) % 10;
  24. int h1 = (m / 1000) % 10;
  25.  
  26. for (int i = f1; i <= h1; i++)
  27. {
  28. for (int j = f2; j <= h2; j++)
  29. {
  30. for (int l = f3; l <= h3; l++)
  31. {
  32. for (int w = f4; w <= h4; w++)
  33. {
  34. if (i%2!=0 && j%2!=0 && l%2!=0 && w%2!=0)
  35. {
  36. Console.Write("" +i+j+l+w+" ");
  37. }
  38. }
  39. }
  40. }
  41. }
  42.  
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement