Hello World in Various Programming Languages


C
#include<stdio.h> int main(void) { printf("Hello World\n"); return 0; }

C++
#include <iostream> int main() { std::cout << "Hello World!" << std::endl; return 0; }

Pascal
program HelloWorld; begin WriteLn('Hello World!'); end

Shell Script
#!/bin/bash echo "Hello, World!"

Visualg Portugol
algoritmo "HelloWorld" inicio escrevaL("Hello World!") fimalgoritmo

Prolog
write('Hello World!')

Ruby
puts "Hello World!"

Python
print "Hello World!"

Lua
print "Hello World!"

Gambas Basic
print "Hello World!"

Java
public class java { public static void main(String[] args) { System.out.println("Hello World"); } }

JavaScript
alert("Hello World");

Cobol
IDENTIFICATION DIVISION. program-id. Helloworld. procedure division. display "Hello World". stop run.

PHP
<?php print("Hello World"); ?>

HTML
<!DOCTYPE html> <html> <head> <title>Hello World HTML</title> </head> <body> <h1>Hello World</h1> </body> </html>
 Scratch