Login
|
Signup
langref.org
-
perl
and
java
add..
all
clojure
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");
}
}
}
Submit a new solution for
perl
or
java
There are 34 other solutions in
additional
languages (
clojure
,
cpp
,
csharp
,
erlang
...)