+ 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..

9th Nov 2017, 8:30 AM
The Great Krishnaℱ
The Great Krishnaℱ - avatar
3 Answers
+ 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
12th Nov 2017, 10:19 AM
Vari93
Vari93 - avatar
+ 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
9th Nov 2017, 9:23 AM
Yuri Lyagin
Yuri Lyagin - avatar
+ 1
oh sorry you are right
9th Nov 2017, 1:46 PM
The Great Krishnaℱ
The Great Krishnaℱ - avatar