Al Xorazmiy nomidagi Toshkent Axborot texnologiyalari univarsitetining kasbiy talim fakulteti 1-kurs talabasi Ismoilova Shohidaning dasturlash 2 fanidan 2-topshiriq javobi.
Tekshirdi: Xaydarova Marxamat.
#include
#include
#include
#include
using namespace std;
int main()
{
srand(time(NULL));
set s;
multiset M{2,3,5,6,7};
multiset::iterator it;
it=M.begin();
float a;
cout<for (auto i=M.begin(); i!=M.end(); i++)
{
cout<<*i<<" ";
}
cout<cout<for (auto i=M.begin(); i!=M.end(); i++)
{
cout<<(*i)+(*it+1)<<" ";
}
auto k = M.begin();
auto l = M.begin();
for (int i = 0; i < 5; i++)
{
s.insert(*k);k++;
s.insert(*l); l++;
}
cout<cout<for (auto i=s.begin(); i!=s.end(); i++)
{
cout<<*i<<" ";
}
getchar();
return 0;
}
#include
Do'stlaringiz bilan baham: |