@ 2008.05.05 , 11:04

世界你好update大家的第一次

[-]

如果你曾经是计算机系学生或者学习过任何一种编程语言的话,通常“Hello World”是第一个编写的程序。 这个程序第一次出现在1978年K&R编写的C语言一书中从那之后这个星球上几乎所有的程序语言都有它的实现。链接中是366种编程语言的实现以及58种人类语言的说法,总有一款适合你..

链接:Hello World

#Sarah: 这个应该是我的第一哈楼,你们的呢?

// Hello World in Java
class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}

# Nice Comments 采集器
Programus 坐上沙发说:

一句
print "hello, world!"
不知道能覆盖多少种语言,呵呵……

azalea(blog) 的第一次是:

#!usr/bin/python
print "Hello world!"
以前学过BASIC,C,Java,Perl,都不记得了,只记得python..

李二嫂的猪(blog) 的第一次是:

WriteLn('Hello World!');

毫米卡尺 的第一次是:

#include
/* 打印"Hello World!";版本1 */
void main()
{
printf("Hello World!\n");
}

青龙 的疑似第一次是:

在C++里面的这段Hello World代码……
#include
void main()
{
std::cout << "Hello World" << std::endl; } 不知道尖括号能不能识别出来。。。

blurblur 的C#第一次是:

//c#版的
using System;
namespace HelloWorld{
class Program {
Console.WriteLine("Hello,world");
}
}

青龙 :

前段时间也特意查过Hello World,最早的使用是这一行:
The first known instance of the usage of the words "hello" and "world" together in computer literature occurred earlier, in Kernighan's 1972 Tutorial Introduction to the Language B, with the following code:

main( ) {
extrn a, b, c;
putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';
原文来自Wikipedia 在1972年……

ATi(blog) 爬上25楼说:

我不会代码
来个自创汉编:
显示 《世界,你好》
《宋体,5号字》
结束

sqybi(blog) 的第一次:

哈 我的第一次嘛 Pascal
begin
writeln('hello world!');
end.
其实作为我们OIer...a+b应该更流行一些...
var
a, b: longint;
begin
readln(a, b);
writeln(a+b);
end.

南 靖男 的第N次:

char *str = "Hello World!", *s;
unsigned short *vidmem = (unsigned short*) 0xb8000; /* 文本显存地址 */
unsigned i;
int cx = (int)*((unsigned char *)0×7BF0); /* boot 保存的光标位置 */
int cy = (unsigned char)*((unsigned char *)0×7BF1);
vidmem += cy * 80; /* 每行 80 个字符 */
vidmem += cx;
for (s = str, i = 0; *s; s++, i++)
vidmem[i] = (unsigned char) *s | 0×0C00; /* 低地址是字符的 ASCII 码,高地址是显示属性 */

Empty 的第N次

document.write("hello world!");

Aiuhx 这个超原始:

小学,一种绘图程序,很原始,控制一个叫做“海龟”的光标进行绘图。每一条线段的长度、角度及起点都需要一个命令。就是说需要像画画那样一笔一划的画出 HELLO WORLD

FD 100 //前进100
BK 50 //后退50
RT 90 //右转90度
FD 50 //前进50
LT 90 //左转90度
FD 50
BK 100 //完成H

RT 90
PU //抬起画笔,就是只是经过,不画出来
FD 20
PD //放下画笔
FD 50
BK 50
LT 90
FD 50
RT 90
FD 50
BK 50
LT 90
FD 50
RT 90
FD 50 /完成E。剩下的就不写了,太长了。

ALEX 的第N次:

10 LET S = "HELLO, WORLD"
20 PRINT S
90 END

LuoboTixS(blog) 的第N次:

扩展对象 窗口 继承自 窗口对象模板
对象事件 绘制时:
100 100 字串" 你好,世界!" 文本输出: 设备描述表
对象事件。
对象。
启动: 窗口

汉编

micro$ucks 的第N次:

用Unicode转义字符来表示的java "Hello world",与下面语句等效...
public
class Ugly
{public
static
void main(
String[]
args){
System.out
.println(
“Hello w”+
“orld”);}}
整理一下是这样~
public class Ugly {
public static void main(String[] args){
System.out.println("Hello w"+"orld");
}
}

leon 使用Ruby的第一次:

Ruby:
puts "hello world!"

支付宝打赏 [x]
您的大名: 打赏金额:
赞一个 (0)