Hello...
Can someone tell me other than doing a bunch of conditional if statements is there a quick way to have a function take an integer argument then compare it to integers within a fixed array size to see which element is the largest one just greater than the value?
For instance:
parameter passed in 87....Want function to return 64 in this instanceCode:d[7] = {1, 10 32, 64, 100, 256, 1000, 1024}
This is in C
Thanks