Advertisement
Guest User

pula

a guest
Apr 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include<iostream>
  2. #include<math.h>
  3. using namespace std;
  4. int n,i,j,x;
  5. double h;
  6. int main()
  7. {
  8.     cout<<"Dati nr de nod n=";
  9.     cin>>n;
  10.     h=log(n+1)/log(2)-1;
  11.     cout<<"Inaltimea este arborelui este "<<h;
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement