Hello World

Output “Hello world!” to the console.

“Hello World” is a sanity check to make sure you haven’t bricked your machine, or made it inoperable.

#include <iostream>
using namespace std;

int main(){
  cout<<"Hello world!"<< endl;
  return 0;
}
class Program {
  static void Main(string[] args) {
    System.Console.WriteLine("Hello world!");
  }
}
public class hello {
  public static void main(String[] args) {
    System.out.println("Hello world!");
  }
}
console.log("Hello world!");
print("Hello world!")
print("Hello world!")

Notes

You should have seen this in class.

Thankfully, they included outputs in C#.

Similar to the C# implementation.

Short and sweet.

Already you can tell Python is going to take the least amount of effort.

Swift’s implementation is also short.