Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int freq, amp, t, x = 1;
- cin >> t;
- cout << endl;
- for(int i = 1; i <= t; i++)
- {
- cin >> amp >> freq;
- cout << endl;
- x = 1;
- while(x <= freq)
- {
- for(int j = 1; j <= amp; j++)
- {
- for(int k = 0; k < j; k++)
- cout << j;
- cout << endl;
- }
- for(int m = amp - 1; m >= 0; m--)
- {
- for(int k = 0; k < m; k++)
- cout << m;
- cout << endl;
- }
- x++;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement