Date: 2015-01-11 03:20 pm (UTC)
это прикол такой есть: :)))

начальная школа

10 PRINT "HELLO WORLD"
20 END

средняя школа

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

старшие классы

void main(void)
{
char *message[] = {"Hello ", "World"};
int i;

for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("\n");
}

молодой специалист

#include
[Error: Irreparable invalid markup ('<iostream.h>') in entry. Owner must fix manually. Raw contents below.]

это прикол такой есть: :)))

<b>начальная школа</b>

10 PRINT "HELLO WORLD"
20 END

<b>средняя школа</b>

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

<b>старшие классы</b>

void main(void)
{
char *message[] = {"Hello ", "World"};
int i;

for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("\n");
}

<b>молодой специалист</b>

#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::operator=(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);
}
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting
Page generated Feb. 9th, 2026 07:10 am
Powered by Dreamwidth Studios