number repeat

Need a C/C++ program to print the number in the below format
…(N times)

value of N is the input

Sample Input:

Sample Output:

you can simply use iteration statements like for, while loops…
t-test cases
while(t–)
{

}

 int i,j,n;
scanf("%d",&n); j=0;

for(...............
            {
          ............
        }
    

Happy Independence day.

1 Like

#include

void …
{
std::stringstream ss;
for(int i=0; i<N; ++i)
{

}

int main()
{
PrintOne…;
}

This kind of questions…

p.s. Please try to solve problems like this yourself and use google for help before posting them here.