+ 2
Testing your skill
Take an input 'n' from user and print the following pattern -> if n=1 * if n=2 * # # * if n=3 * # # # * * * # # if n=4 * # # # # # * * * * # # # # # * if n=5 * # # # # # # # * * # * * # # # # # * * * # # # # and so on..
3 odpowiedzi
+ 2
Here you go. Took me a few days to think of something that would work lol. Checks for valid input
https://code.sololearn.com/cXvvAir79ZJ1/?ref=app
+ 1
may be I misunderstood algorithm, but then n=5 third line: #**##, is it correct? I guess it should be ***##, nah? if l'm wrong could you write example with N=7
+ 1
oh sorry you are right