Advertisement
spasnikolov131

Untitled

Mar 10th, 2023
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace gauss2
  6. {
  7. internal class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. List<int> firstArray = Console.ReadLine().Split()
  12. .Select(int.Parse)
  13. .ToList();
  14.  
  15. List<int> secondArray = Console.ReadLine().Split()
  16. .Select(int.Parse)
  17. .ToList();
  18.  
  19. List<int> result = new List<int>();
  20.  
  21. for (int i = 0; i < firstArray.Count; i++)
  22. {
  23. for (int j = 0; j < secondArray.Count; j++)
  24. {
  25. if (firstArray.Count > secondArray.Count)
  26. {
  27. result.Add(firstArray[i]);
  28. result.Add(secondArray[j]);
  29. }
  30. }
  31. }
  32. Console.WriteLine(string.Join(" ", result));
  33. }
  34. }
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement