pascal triangle in c++

Sample code for draw pascal triangle in c++ #include using namespace std; main() { int i,j,k,l; for(i=1;i<=6;i++){ for(j=1;j<=12;j++){ if(j>=6-i && j<=4+i){ cout<<“*”;} else{ cout<<” “;} } cout<<“\n”; } } output: