程序员进化史



初中/高中


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[i];
cout << "\n";
}
void outstring::assign(char* chrs) {
int i;
for (i=0; chars[i]!='\0'; i++)
str[i] = chrs[i];
size=i;
}

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


老板


“乔治,我需要一个能打印'Hello World!'的程序”

你可能感兴趣的:(C++,c,工作,C#)