How to say hello to the world?
Java
class Hello{
public static void main(String[] args){
System.out.println("Hello World!");
}
}
C
#include <stdio.h>
int main(){
printf("Hello World!");
return 0;
}
C++
#include <iostream>
int main(){
std::cout << "Hello World!" << std::endl;
return 0;
}
###C#
namespace HelloWorld{
class Hello{
static void Main(String[] args){
System.Console.WriteLine("Hello World!");
}
}
}
Python
print("Hello World!")
Ruby
puts 'Hello World!'
TCL Language
puts "Hello World!"
JavaScript
console.log("Hello World!");
TypeScript
console.log 'Hello World!'
Perl
print "Hello World!";
R
cat('Hello World!');
Swift
println('Hello World!');
Kotlin
fun main(args: Array<String>){
println("Hello World!")
}
Go
println('Hello World!');
PHP
echo "Hello World!";
VBA
msgbox "Hello World"
Assembly Language
global _main
extern _printf
section .text
_main:
push message
call _printf
add esp, 4
message:
db 'Hello World!', 11, 0
Me
Hello the fucking world