Skip to content

How to make "Hello World" in different programming languages.

Notifications You must be signed in to change notification settings

AgataBialoskorska/hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello World

How to make "Hello World" in different programming languages.

A lot of them must be compiled before run, short instructions for MacOS below (tested on 10.15.7 / Catalina).

  1. Assembly (.asm)
    • nasm -fmacho64 hello.asm
    • ld -macosx_version_min 10.7.0 -lSystem -o hello hello.o
    • ./hello
  2. C (.c)
    • gcc hello.c
    • ./a.out
  3. C++ (.cpp)
    • g++ hello.cpp -o hello
    • ./hello
  4. Cobol (.cbl)
  5. C# (.cs)
    • brew install mono
    • mcs hello.cs
    • mono hello.exe
  6. Erlang (.erl)
    • brew install erlang
    • erl hello.erl (to open Erlang console)
    • io:fwrite("Hello from Erlang\n").
  7. Elixir (.ex)
    • brew install elixir
    • elixir hello.ex
  8. Golang (.go)
    • go run hello.go
  9. Haskell (.hs)
    • brew install ghc
    • ghc -o hello hello.hs
    • ghc hello.hs
    • ./hello
  10. Java (.java)
    • javac hello.java
    • java hello
  11. Kotlin (.kt)
    • kotlinc hello.kt -d kotlin.jar
    • java -jar kotlin.jar
  12. PHP (.php)
    • php hello.php
  13. Perl (.pl)
    • perl hello.pl
  14. Python (.py)
    • python hello.py
  15. Ruby (.rb)
    • ruby hello.rb
  16. Rust (.rs)
    • rustc hello.rs
    • ./hello
  17. Scala (.sc)
    • scalac hello.scala
    • scala hello
  18. Bash (.sh)
    • sh hello.sh
  19. Swift (.swift)
    • swift
    • print ("Hello from Swift ")

About

How to make "Hello World" in different programming languages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published