Python (.py)
print('Hello world!')
Bhai Lang
hi bhai
bol bhai "Hello World";
bye bhai
Javascript (.js)
console.log('Hello world!');
Typescript (.ts)
console.log('Hello world!');
Java (.java)
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
C (.c)
#include <stdio.h>
int main()
{
printf("Hello World");
return 0;
}
c++ (.cpp)
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World";
return 0;
}
PHP (.php)
<?php
echo 'Hello World';
?>
C# (.cs)
using System;
class HelloWorld {
static void Main() {
Console.WriteLine("Hello World");
}
}
Dart (.dart)
void main(){
print("Hello World");
}
VB (.vb)
Module VBModule
Sub Main()
Console.WriteLine("Hello World")
End Sub
End Module
HTML (.html)
<html>
<body>
<h1>Hello World</h1>
</body>
</html>
Ruby (.rb)
puts "Hello World"
Scala (.scala)
object HelloWorld extends App {
println("Hello World")
}
Perl (.pl)
print "Hello World";
Pascal (.pas)
program Hello;
begin
writeln ('Hello World')
end.
R (.r)
print("Hello World")
Fortan (.f95)
Program Hello
Print *, "Hello World"
End Program Hello
Haskell (.hs)
main = putStrLn "Hello World"
Objective C (.m)
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog (@"Hello World");
[pool drain];
return 0;
}
Swift (.swift)
print("Hello World")
Rust (.rs)
fn main() {
println!("Hello World");
}
Go (.go)
package main
import "fmt"
func main() {
fmt.Println("Hello World")
}
Bash (.bash)
echo "Hello World";
ASP.NET (.aspx)
Response.Write("Hello World");
Top comments (0)