Write a program that will display the following pattern, given the value of n.
Example : if n=4, output.
*
**
***
****
#include <iostream>
using namespace std;
int main()
{
int n,i,j;
i=0;
cout<<"enter the number:";
cin>>n;
cout<<"\n";&
while(i<n+1){
for(j=0; j<i; j++){
cout<<"*";
}
i++;
cout<<"\n";
}
cout<<"\n\n";
system("PAUSE");
}