QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2216|回复: 3

程序员进化史

[复制链接]
发表于 2005-10-11 17:33:20 | 显示全部楼层 |阅读模式
程序员进化史


--------------------------------------------------------------------------------

初中/高中

10 PRINT "HELLO WORLD"
20 END

大学一年级

program Hello(input, output);
begin
  writeln('Hello world');
end.

大学四年级

(defun hello ()
  (print (list 'HELLO 'WORLD)))

刚参加工作

#include <stdio.h>

main (argc, argv)
int argc;
char **argv; {
  printf ("Hello World!\n");
}

老手

#include <stream.h>

const int MAXLEN = 80;

class outstring;
class outstring {
private:
  int size;
  char str[MAXLEN];

public:
  outstring() { size=0; }
  ~outstring() { size=0; }
  void print();
  void assign(char *chrs);
};

void outstring::print() {
  int in;
  for (i=0; i<size; i++)
    cout << str;
  cout << "\n";
}

void outstring::assign(char* chrs) {
  int i;
  for (i=0; chars!='\0'; i++)
    str = chrs;
  size=i;
}

main (int argc, char **argv) {
  outstring string;
  string.assign("Hello World!");
  string.print();
}

老板

“乔治,我需要一个能打印'Hello World!'的程序”
发表于 2005-11-19 10:27:04 | 显示全部楼层
回复

使用道具 举报

发表于 2005-11-25 10:44:57 | 显示全部楼层
$_$
回复

使用道具 举报

发表于 2005-11-25 12:39:27 | 显示全部楼层
3n,我需要一个能打印'Hello World!'的程序
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-3-28 20:12 , Processed in 0.061968 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表