Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
it's easy !! u need to make 3 loops! first for the no. of rows that's our main loop next a nested loop for spacing!!.. it can be like for(j=1 ;j<=n-i;j++) where i will be the variable in outermost loop (the first one) and n I the no. of rows!! then after this loop the last loop!! for(k=1;k<=i;k++)in this loop u need to print the stars!! if u still have some questions! u may ask!
1st Oct 2016, 8:18 AM
ishika jain