by-小世界
http://redcisco.blog.163.com
C
#include <stdio.h>
main()
{
printf ("Hello World!\n");
}
C++
#include <iostream.h>
main()
{
for(;;)
{
cout << "Hello World! ";
}}
C#
class HelloWorld
{
static void Main () {
System.Console.Write("Hello World!");
}
}
PHP
<?php
echo "<html>
<head>
<title>Hello World Page</title>
</head>
<body>
Hello World!
</body>
</html>"
?>
HTML
<HTML>
<HEAD>
<TITLE>Hello, World Page!</TITLE>
</HEAD>
<BODY>
Hello, World!
</BODY>
</HTML>
Java
class HelloWorld {
public static void main (String args[]) {
for (;;) {
System.out.print("Hello World ");
}
}
}
Perl
print "Hello, World!\n" while (1);
Python
print "Hello world!"
Also an infinite loop:
while True:
print "Hello world!"
Ruby
for i in 1..1
puts "Hello World!"
end
感谢hello,world page!