+ 5

Need some help in this code

I want to make a code that takes the numbers of stars that it will print and it will draw pyramid and it will only take only odd numbers i made the code finaly but what i want is nit number of lines but the odd number in the number i put i put example in tge code please help https://code.sololearn.com/c931sjv25Pny/?ref=app

2nd Dec 2018, 4:45 PM
Dareen Moughrabi
Dareen Moughrabi - avatar
3 Respostas
+ 16
//For half upper triangle of pyramid ● start a from outer loop for accounting number of rows to print ● there will be 2 loops inside it, one for accounting spaces before beginning of stars & one for number of stars to print in a particular row
2nd Dec 2018, 5:20 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 16
dareen moughrabi see example number 4 here [my old code, when I was trying to make some patterns] ● 1 outer loop accounting for number of rows to print & 2 inner loops for spaces & stars 👍 //enjoy making other patterns also☺ https://code.sololearn.com/cLeVyd5o66zk/?ref=app
2nd Dec 2018, 5:23 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 4
Cool example i will try making it i hope i do it right thanks
2nd Dec 2018, 5:30 PM
Dareen Moughrabi
Dareen Moughrabi - avatar