#include<iostream>
using namespace std;
int main()
{
    int testcases,freq,amplituide;
    cin>>testcases;
    for(int i=1;i<=testcases;i++)
    {
        cin>>amplituide>>freq;
        for(int x=1;x<=freq;x++)
        {
         for(int j=1;j<=amplituide;j++)
         {
             cout<<endl;
            for(int jj=j;jj>=1;jj--)
            cout<<j;
         }
            for(int k=(amplituide-1);k>=1;k--)
            {
            cout<<endl;
            for(int kk=k;kk>=1;kk--)
            cout<<k;
            }
            if(x<freq)
                cout<<endl<<endl;
        }
    }
    return 0;
}

Inline Code Example Here

Recommended Answers

All 2 Replies

So, you post code, but ask no question. What is it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.