C and I’m working on a speaking clock. My problem is that I can save the time (hour and minute) in two NSIntegers but I can’t compare them.
The concrete problem is that I want to separate the time (for example the hour is stored in the NSInteger like this: 16. I want to get a 1 and a 6 separately). I want to separate one digit from the other digit to compare them.
Can anybody help me? A good compare syntax also will be a big help! Thanks.
If I understood your request, you want to separate the the whole number into digits from 0-9?
you could do it like this: