Advertisement
Mikhail-Podbolotov

Untitled

May 29th, 2024
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include "library.h"
  2. #include <iostream>
  3. #include <fstream>
  4. using namespace std;
  5. int main()
  6. {
  7.     ifstream input("input.txt");
  8.     Tree A;
  9.     double x;
  10.     while (!input.eof()) {
  11.         input >> x;
  12.         A.Add(x);
  13.     }
  14.     //cout << A.GetMaxElementCount();
  15.     if (A.isBalanced()) cout << "Balanced" << endl;
  16.     else cout << "Not Balanced" << endl;
  17.     int res = 0;
  18.     if (A.FindDivEL(res)) cout << "ELEMENT: " << res << endl;
  19.     else cout << "ELEMENT NOT FOUND";
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement