Advertisement
Neveles

Untitled

Jan 20th, 2020
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include "List.h"
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     setlocale(LC_ALL, "rus");
  9.     List list;
  10.     List vstav;
  11.     int value = 0;
  12.     for (int i = 0; i < 10; ++i)
  13.     {
  14.         list.insertSorted(rand() % 10);
  15.     }
  16.     for (int i = 0; i < 10; ++i)
  17.     {
  18.         cin >> value;
  19.         vstav + value;
  20.     }
  21.     cout << endl << list << endl;
  22.     cout << vstav << endl;
  23.     list.joinSorted(vstav);
  24.     cout << list << endl << "removeMinimal()" << endl;
  25.     list.removeMinimal();
  26.     cout << list << endl << "removeRepeats()" << endl;
  27.     list.removeRepeats();
  28.     cout << list << endl << "removeLess()" << endl;
  29.     list.removeLess();
  30.     cout << list << endl << "reduce()" << endl;
  31.     list.reduce();
  32.     cout << list << endl;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement