Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ogito

  1. ogito

    Calculating help

    How would I calculate an infinite series like this in a loop. 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + etc. The user inputs how far to go like, 1 would be 4, 2 would be 2.667. 3 would be 3.467. How would I account for the fact that there is a + and - that switches?
  2. ogito

    getting input from user

    I need to get input from the user, check the range of the number, then reprint the number to the screen. This is what I have so far main: mov ax, 0 mov [sum], ax beg: mov eax, 3 mov ebx, 0 mov ecx, chr mov edx, 3 int 0x80 cmp byte [chr], 0x30 jb e1 cmp byte [chr], 0x39 ja e1...
  3. ogito

    BTR Depth

    This is what I have so far for depth int depth( node * n ) { int r, l; /* right and left count */ /* early-out if empty */ if( n==0 ) { /* tree is empty */ return 0; } /* initialize to zero */ r=l=0; /* count max in both directions */ if( n->right )...
  4. ogito

    BTR Depth

    I need to write a routine that computes the maximum depth of the tree and run it after each insert and print out the depth. I've tried writing the code but it doesn't print out the depth! Can anyone help?? node *insert(int value, node *n) { if (n == NULL) { return mkleaf(value) ...

Part and Inventory Search

Back
Top