Jump to content

Hello world program

From Simple English Wikipedia, the free encyclopedia
Revision as of 02:49, 29 November 2022 by The samr (talk | changes) (Added Go and Ruby; simplified C example)

A Hello world program is usually a program made by computer programmers that are new to a programming languages, or to test if the compiler for this language is working correctly. It will simply put the text Hello, World! on the screen. One way to do the Hello World program is shown below, in the C programming language.

#include <stdio.h>

int main()
{
     printf("Hello World");
     return 0;
}

On Python programming language:

print("Hello World")

On Pascal programming language

program helloworld;
begin
     WriteLn('Hello World');
end.

On Lua programming language:

print("Hello World")

On C++ programming language:

#include <iostream>

int main()
{
  std::cout << Hello World << std::endl;
  return 0;
}

On Julia programming language:

println("Hello, World!")

On Go programming language:

package main
import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

On Ruby programming language:

puts "Hello World"

On BASIC programming language:

10 PRINT "Hello World"

Other websites