发新话题
打印

Hello World !

Hello World !

高中
10 PRINT "HELLO WORLD"
20 END


大一
program Hello(input, output)
begin
writeln('Hello World')
end.


大四
(defun hello
(print
(cons 'Hello (list 'World))))


新教授
#include <stdio.h>

void main(void)
{
  char *message[] = {"Hello ", "World"};
  int i;
  for(i = 0; i < 2; ++i)
  printf("%s", message);
  printf("\n");
}


资深教授
#include <iostream.h>
#include <string.h>
class string
{
  private:
   int size;
   char *ptr;
  public:
   string() : size(0), ptr(new char('\0')) {}
   string(const string &s) : size(s.size)
   {
     ptr = new char[size + 1];
     strcpy(ptr, s.ptr);
   }
   ~string()
   {
     delete [] ptr;
   }
   friend ostream &operator <<(ostream &, const string &);
   string &operator=(const char *);
};
                                                                     
ostream &operator<<(ostream &stream, const string &s)
{
   return(stream << s.ptr);
}
string &string:perator=(const char *chrs)
{
   if (this != &chrs)
   {
     delete [] ptr;
     size = strlen(chrs);
     ptr = new char[size + 1];
     strcpy(ptr, chrs);
   }
   return(*this);
}
int main()
{
   string str;
   str = "Hello World";
   cout << str << endl;
   return(0);
}


系统管理员
#include <stdio.h>
#include <stdlib.h>
main()
{
  char *tmp;
  int i=0;
  /* on y va bourin */
  tmp=(char *)malloc(1024*sizeof(char));
  while (tmp="Hello Wolrd"[i++]);
  /* Ooopps y'a une infusion ! */
  i=(int)tmp[8];
  tmp[8]=tmp[9];
  tmp[9]=(char)i;
  printf("%s\n",tmp);
}

初级黑客
#!/usr/local/bin/perl
$msg="Hello, world.\n";
if ($#ARGV >= 0) {
     while(defined($arg=shift(@ARGV))) {
         $outfilename = $arg;
         open(FILE, ">" . $outfilename) || die "Can't write $arg: $!\n";
         print (FILE $msg);
         close(FILE) || die "Can't close $arg: $!\n";
     }
} else {
     print ($msg);
}
1;

高级黑客
#include <stdio.h>
#include <string.h>
#define S "Hello, World\n"
main(){exit(printf(S) == strlen(S) ? 0 : 1);}


资深黑客
% cc -o a.out ~/src/misc/hw/hw.c
% a.out
Hello, world.


终极黑客
% cat
Hello, world.

新领导 (do you remember?)
10 PRINT "HELLO WORLD"
20 END


中级领导
mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello, world."?
I need it by tomorrow.
^D


高级经理
% zmail jim
I need a "Hello, world." program by this afternoon.

首席执行官
% letter
letter: Command not found.
% mail
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout

科学家
        PROGRAM HELLO
        PRINT *, 'Hello World'
        END

老科学家
        WRITE (6, 100)
    100 FORMAT (1H ,11HHELLO WORLD)
        CALL EXIT
        END      

TOP

是一期程序员 杂志上的吧      

TOP

gnu.org 上的      
15 is too short

TOP



感觉终极黑客最酷,      
Advance Monitor - Linux Monitoring Solution

TOP

对号入座--我是新教授水平了。
就能看懂那个版本^_^      
# - - - - - - - - - - - - - - # 我要当高手! 我要安LFS!!!

TOP

发新话题