Last active
August 29, 2015 14:04
-
-
Save easoncxz/87e26fce69b32f39c8b0 to your computer and use it in GitHub Desktop.
Hello World in a few different languages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#inlcude <stdio.h> | |
void main() { | |
printf("hello world\n"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
cout << "hello world\n"; | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "hello world\n"; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("hello world") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SomeClass { | |
public static void main(String[] args) { | |
System.out.println("hello world"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The lines below starting with the dollar sign ($) denote commands you type in (at the terminal). | |
# The lines without a dollar sign denote program output. | |
# Some blank lines are added between languages, for readability. | |
$ python python.py | |
hello world | |
$ javac SomeClass.java | |
$ java SomeClass | |
hello world | |
$ gcc c.c -o c | |
$ ./c | |
hello world | |
$ g++ cpp.cpp -o cpp | |
$ ./cpp | |
hello world | |
$ php php.php | |
hello world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment