C语言(C语言编译工具,如codeBlocks)
#include<stdio.h>
int main(){
<strong>printf("hello world");</strong>
}
java(java编译工具:eclipse)
public class helloWorld {
public static void main(String args[]){
<strong>System.out.print("hello world");</strong>
}
}
perl(可用perl编译工具,如Strawberry Perl)
print"hello world";
python
print("hello world")
php
echo"hello world";
C++
#include <iostream>
using namespace std;
int main() {
<h4> cout << "hello world" << endl; </h4> return 0;
}
javaScript
document.write("hello world");
alert("hello world");
JS控制台:console.log("hello world");
另外。。。
ruby
print("hello world")
p"hello world"
puts %Q.hello world