Article tagué Hello World
L’évolution d’un Programmeur
16/10/09
High School/Junior High
First year in College10 PRINT « HELLO WORLD » 20 END
Senior year in Collegeprogram Hello(input, output) begin writeln(‘Hello World’) end.
New professional(defun hello (print (cons ‘Hello (list ‘World))))
Seasoned professional#include void main(void) { char *message[] = {« Hello « , « World »}; int i;
for(i = 0; i < 2; ++i) printf(« %s », message[i]); printf(« \n »); }
#include #include
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 La suite >
