Skip to content

Instantly share code, notes, and snippets.

@cx20
cx20 / hello.c
Created June 9, 2012 17:50
Hello, C World!
#include <stdio.h>
int main( int argc, char* argv[] )
{
printf( "Hello, C World!\n" );
return 0;
}
@cx20
cx20 / hello.cpp
Created June 9, 2012 18:07
Hello, C++ World!
#include <iostream>
using namespace std;
int main( int argc, char* argv[] )
{
cout << "Hello, C++ World!" << endl;
return 0;
}
@cx20
cx20 / Hello.cs
Created June 9, 2012 18:11
Hello, C# World!
using System;
class Hello
{
static void Main( string[] args )
{
Console.WriteLine( "Hello, C# World!" );
}
}
@cx20
cx20 / Hello.java
Created June 9, 2012 18:13
Hello, Java World!
public class Hello {
public static void main( String[] args ) {
System.out.println( "Hello, Java World!" );
}
}
@cx20
cx20 / hello.m
Created June 9, 2012 18:15
Hello, Objective-C World!
#import <Foundation/Foundation.h>
@interface HelloWorld : NSObject
{
}
- (void) sayHello;
@end
@implementation HelloWorld
- (void) sayHello
@cx20
cx20 / hello.st
Created June 9, 2012 18:37
Hello, Smalltalk World!
'Hello, Smalltalk World!' printNl
@cx20
cx20 / Hello.vb
Created June 9, 2012 18:39
Hello, VB.NET World!
Imports System
Class Hello
Shared Sub Main()
Console.WriteLine ("Hello VB.NET World!")
End Sub
End Class
@cx20
cx20 / hello.f
Created June 9, 2012 18:41
Hello, Fortran World!
PRINT *, "Hello, Fortran World!"
END
@cx20
cx20 / hello.pas
Created June 9, 2012 18:44
Hello, Pascal World!
program hello;
begin
writeln( 'Hello, Pascal World!' );
end.
@cx20
cx20 / hello.go
Created June 9, 2012 18:47
Hello, Go World!
package main
import "fmt"
func main() {
fmt.Printf( "Hello, Go World!\n" );
}