Advertisement
kzborisov

Untitled

Nov 4th, 2018
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 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 _06.Challenge_The_Wedding
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. //1. Read Input
  14. int menCount = int.Parse(Console.ReadLine());
  15. int womenCount = int.Parse(Console.ReadLine());
  16. int maxTables = int.Parse(Console.ReadLine());
  17.  
  18. //2. Manipulate Data
  19. for (int i = 1; i <= menCount; i++)
  20. {
  21. for (int j = 1; j <= womenCount; j++)
  22. {
  23.  
  24. maxTables--;
  25. if (maxTables >= 0)
  26. {
  27. Console.Write($"({i} <-> {j}) ");
  28. }
  29. else
  30. {
  31. break;
  32. }
  33.  
  34. }
  35. }
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement