Тест №4 (полиморфизм). Пример. Что будет выведено в стандартный поток в результате выполнения программы? 1)--------------------------------------------------------- void main() { list x; for(int i=0; i<=5; i++) { x.push_back(i); } x.sort(); list::iterator it=find(x.begin(), x.end(), 2); while(it != x.end()) { cout<<*it++<<','; } } 2)--------------------------------------------------------- void main() { map > week; week["Mondey"]=1; week["Tuesday"]=2; week["Wednesday"]=3; week["Thursday"]=4; map >::iterator first_it=week.begin(), last_it=week.end(); while( first_it != last_it) { cout << first_it->first << '-' << first_it->second <<' '; first_it++; } } 3)--------------------------------------------------------- template class complex2 { private: PAR m_re, m_im; public: complex2(PAR re, PAR im=PAR(0)); complex2 operator* (const complex2& one) const; friend ostream& operator<<(ostream& out, complex2& one); }; template complex::complex(PAR re, PAR im) : m_re(re), m_im(im) { } template ostream& operator<<(ostream& out, complex2& one) { return out<<"("< complex2 complex2::operator* (const complex2& one) const { return complex2(m_re*one.m_re - m_im*one.m_im,m_re*one.m_im + one.m_re*m_im); } void main() { complex2 x(1, 2.1), y(3); cout<