Advertisement
Guest User

Untitled

a guest
Jul 4th, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 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 Wedding_nested_more_
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int mens = int.Parse(Console.ReadLine());
  14. int women = int.Parse(Console.ReadLine());
  15. int totalTables = int.Parse(Console.ReadLine());
  16. int couter = 1;
  17.  
  18. do
  19. {
  20. for (int i = 1; i <= mens; i++)
  21. {
  22. couter++;
  23. for (int j = 1; j <= women; j++)
  24. {
  25. Console.Write($"({i} <-> {j}) ");
  26. couter++;
  27. }
  28. }
  29.  
  30.  
  31. } while (totalTables >= couter);
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement