Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits\stdc++.h>
- using namespace std;
- int main()
- {
- int t;
- scanf("%d", &t);
- while(t--)
- {
- int n, i, j;
- scanf("%d", &n);
- for(j = 0; j < n; j++)
- {
- for(i = 0; i < j; i++) printf("()");
- for(i = 0; i < n - j; i++) printf("(");
- for(i = 0; i < n - j; i++) printf(")");
- printf("\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement