R3 - PATTERN 2 problem

#include
using namespace std;
int main()
{
int n;
cin>>n;
int i,j;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
cout<<"*";
}
cout<<endl<<endl;
}
return 0;
}

The quesn link is given below
https://hack.codingblocks.com/practice/p/341/82

sir my 2 cases are passed but 3 case is failing i m not getting my error.

https://ide.codingblocks.com/#/s/25258
I made correction in your code.
You have to write endl only one time.
Rest the code was perfect!

1 Like