Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<math.h>
- using namespace std;
- int n,i,j,x;
- double h;
- int main()
- {
- cout<<"Dati nr de nod n=";
- cin>>n;
- h=log(n+1)/log(2)-1;
- cout<<"Inaltimea este arborelui este "<<h;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement