This challenge is to print to console “Hello World” in several different ways in any programming language. If someone has already posted a way to say “Hello World”, you cannot use it again .
For example,
JavaScript: console.log("Hello World");
Good luck! Let’s see how many different types of code we can create to say Hello World!
EDIT: Thanks to @albionsrefuge for showing this cool site to give more ideas for languages and test them: https://repl.it/languages
2nd EDIT: Check out @g4be ’s new awesome challenge here !
4 Likes
^
Javascript: console.log(“Hallo Wereld”)
In Afrikaanns
4 Likes
Forgot to fix, I meant to say programming language. Not a speaking language haha
3 Likes
Looks like someone beat you to ruby haha
3 Likes
Uhm… i think i need to rewrite my C program:
#include <stdio.h>
int main(void){
printf("hello, world\n");
}
7 Likes
Gotta give Java some love:
Java: System.out.println("Hello World!");
5 Likes
@grisful Woops, I didn’t see @stetim94 ’s post
Am I remembering wrong, or does Ruby have print
, like Python?
Ruby:
print "Hello, World!"
4 Likes
Unix scripts: echo "Hello World"
6 Likes
grisful
January 28, 2016, 4:52pm
11
Yup! Python does have the same print “type” as Ruby (I think).
2 Likes
I think my reply was just a few seconds before you. Yes, ruby also has a print
How could i forgot unix script? for someone who uses linux on a daily basis, that is quit a shame
3 Likes
Lua
print("Hello World")
D
import std.stdio;
void main()
{
writeln("Hello, World!");
}
4 Likes
g4be
January 28, 2016, 5:28pm
15
If I’m not wrong, this code in Assembly is correct.
.data
msg: .asciiz "Hello World"
.text
.globl main
main:
li $v0, 4
la $a0, msg
syscall
jr $ra
Edit: Yep, is correct. Wrote this back in 2015/January
4 Likes
"Hello World"
in Scheme, a dialect of Lisp …
(print "Hello World")
3 Likes
R:
hello <- function( name ) {
sprintf( "Hello, %s", name );
}
2 Likes
rydan
January 28, 2016, 9:15pm
18
Java:
public class HelloWorld{
public static void main(String[] args) {
System.out.printf("HelloWorld");
}
}
PHP:
<?php
echo "Hello World";
?>
Verilog:
module HelloWorld;
initial
begin
$display("Hello, world!");
#5
end
endmodule
Go
import "fmt"
func main() {
fmt.Println("Hello World");
}
2 Likes
There is a language i don’t know, i do know it exist, it is called brainfuck, this is hello world in brainfuck:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Oh, and we are still missing c++/c#, but i don’t know those languages.
4 Likes
rydan
January 28, 2016, 9:23pm
20
With the very little I know in Haskell hello world would be printed like this
putStrLn "Hello World"
1 Like