Problem 5 from 52 programming problems book

#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
    int testcase,star,i,j,k;
    cin>>testcase;
    for(i=0; i<testcase; i++)
    {
        cin>>star;
        for(j=0; j<star; j++)
        {
            printf("\n");
            for(k=0; k<star; k++)
            {
                printf("*");
            }
        }
        printf("\n");
    }

    return 0;
}

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *