Exactly what I'm thinking. If digit is going to be the output on the 7 segment led why are you setting it equal to the loop iteration rather than the Speed?
Type: Posts; User: void_t
Exactly what I'm thinking. If digit is going to be the output on the 7 segment led why are you setting it equal to the loop iteration rather than the Speed?
The tries part goes inside the nested do-while loop (the one where you keep guessing).
This is why you should probably use different variable names. I'm just guessing at your problem but I'm pretty sure its this.
top and bottom are both single pointers in main. So you pass the...
First of all, computing a number mod A (num % A) gives you a number from 0 to A-1, not 0 to A. Also, in C, mod doesn't work correctly with negative numbers but there's an easy fix and its not...