Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void P(int x, int y, string s)
- {
- if (x + y == 0)
- {
- Console.WriteLine(s);
- return;
- }
- if (x>0)
- P(x - 1, y, s + "1");
- if (y>0)
- P(x, y - 1, s + "0");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement