Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int menCount, womenCount, tables;
- cin >> menCount >> womenCount >> tables;
- for (int i = 1; i <= menCount; i++) {
- for (int k = 1; k <= womenCount; k++) {
- if (tables == 0) {
- break;
- }
- cout << "(" << i << " <-> " << k << ") ";
- tables--;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement