Cognizant Coding Question- 11

One comment on “Cognizant Coding Question- 11”


  • Ab

    #include
    using namespace std;
    int main()
    {
    int n;
    cout<>n;

    for(int i=1;i<=n;i++)
    {
    for(int k=1;k<=n-i;k++)
    {
    cout<<" ";
    }
    for(int k=1;k<=i;k++)
    {
    cout<<"*";
    }
    cout<<endl;
    }