+ 7

Easy Challenge

With a single for loop statement and a single print statement, write a program that displays this: # ## ### #### ##### ###### ####### Please, in not more than two lines of meaningful code, the third line could be the closing bracket of the for-loop........ (excluding header files)

30th Dec 2017, 6:41 PM
Gospel Isaac
Gospel Isaac - avatar
18 Answers
+ 4
Java for(String ¡ ="#"; i.length() <= 7; i +="#"){ System.out.println(i); } Javascript for(let i = "#"; i.length <= 7; i += "#"){ console.log(i); }
30th Dec 2017, 9:39 PM
Gospel Isaac
Gospel Isaac - avatar
30th Dec 2017, 7:32 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 14
https://code.sololearn.com/cqU4FiHQO9aL/?ref=app
31st Dec 2017, 2:14 PM
Justine Ogaraku
Justine Ogaraku - avatar
30th Dec 2017, 7:00 PM
LukArToDo
LukArToDo - avatar
+ 8
print("#","##","###","####","#####","######","#######",sep="\n")
30th Dec 2017, 6:26 PM
VcC
VcC - avatar
31st Dec 2017, 8:45 AM
Abhishek Tandon
Abhishek Tandon - avatar
+ 6
too easy
30th Dec 2017, 6:24 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 5
vCc you were supposed to use a for loop😂😂 that's rogue
30th Dec 2017, 6:29 PM
᠌᠌Code X
᠌᠌Code X - avatar
30th Dec 2017, 6:28 PM
István Vámosi
István Vámosi - avatar
+ 4
for i in range(8): print(i*"#")
31st Dec 2017, 5:15 PM
MsShugg😘
MsShugg😘 - avatar
+ 3
for i in range(8): print("#"*i)
30th Dec 2017, 6:27 PM
LordHill
LordHill - avatar
+ 3
please not more than two lines of code
30th Dec 2017, 6:51 PM
Gospel Isaac
Gospel Isaac - avatar
30th Dec 2017, 6:21 PM
Andreas K
Andreas K - avatar
+ 2
https://code.sololearn.com/c6WANuYPgEIn/?ref=app
18th Jan 2018, 3:27 PM
...
+ 1
Excluding python language in not more than two lines, the third line could be the closing bracket of the for-loop
30th Dec 2017, 6:39 PM
Gospel Isaac
Gospel Isaac - avatar
+ 1
here, nobody ever does anything in C# around here so I did https://code.sololearn.com/cYOjIVtam0VC/?ref=app
30th Dec 2017, 6:47 PM
LordHill
LordHill - avatar
0
Tried this challenge on my laptop in c++.When I run the program, instead of #,the output is in smiley faces,clubs,diamonds,hearts and spades.Anyone know what thats about?
18th Jan 2018, 4:08 PM
MsShugg😘
MsShugg😘 - avatar