Login
|
Signup
langref.org
-
perl
,
java
, and
clojure
add..
all
cpp
csharp
erlang
fantom
fsharp
go
groovy
haskell
ocaml
php
python
ruby
scala
Home
All
Solved
Unsolved
Strings
Numbers
Regex
Lists
Maps
Structure
Files
Dates
OOP
Networking
XML
Algorithms
Misc
Parallel
View Problem
Structure
Loops
Perform an action a fixed number of times (FOR)
Display the string
"Hello"
five times like
"HelloHelloHelloHelloHello"
perl
print "Hello" x 5
print "Hello" x 5
perl
print "Hello" for (1..5)
print "Hello" for (1..5)
java
for(int i=0;i<5;i++) {
System.out.print("Hello");
}
public class Solution49 {
public static void main(String[] args) {
for(int i=0;i<5;i++) {
System.out.print("Hello");
}
}
}
clojure
(dotimes [_ 5]
(print "Hello"))
(dotimes [_ 5]
(print "Hello"))
Submit a new solution for
perl
,
java
, or
clojure
There are 33 other solutions in
additional
languages (
cpp
,
csharp
,
erlang
,
fantom
...)