0
Triangle Pattern. HELP !!!
https://code.sololearn.com/cP24hY4c5Xiw/?ref=app This program works fine but i have a little confusion about a step i have declared s= (n/2)+1; so when i use this "s" as a condition in "i" loop. I dont get the required output. but when i use this value of s in condition it works fine... it should work for both the cases as "s" and ( n/2)+1 are equal please help.. thank you
3 Antworten
+ 2
your welcome :)
+ 1
It is because you modify the value of s in the for loop.
It is the line "--s;" that have this effect.
+ 1
Thank You 😇