+ 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)
17 Antworten
+ 4
Java
for(String ÂĄ ="#"; i.length() <= 7; i +="#"){
System.out.println(i);
}
Javascript
for(let i = "#"; i.length <= 7; i += "#"){
console.log(i);
}
+ 14
https://code.sololearn.com/cqU4FiHQO9aL/?ref=app
+ 13
One line...
https://code.sololearn.com/cXGPik2eBtrV/?ref=app
+ 8
print("#","##","###","####","#####","######","#######",sep="\n")
+ 7
Here's mine
https://code.sololearn.com/cXdm7MGoJQ4M/?ref=app
+ 6
too easy
+ 5
vCc you were supposed to use a for loopđđ
that's rogue
+ 4
for i in range(8):
print(i*"#")
+ 3
for i in range(8):
print("#"*i)
+ 3
please not more than two lines of code
+ 2
https://code.sololearn.com/c6WANuYPgEIn/?ref=app
+ 1
Excluding python language in not more than two lines, the third line could be the closing bracket of the for-loop
+ 1
here, nobody ever does anything in C# around here so I did
https://code.sololearn.com/cYOjIVtam0VC/?ref=app
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?