Originally Posted by
laserlight
Is there any reason why you cannot use control statements?
c99tutorial's conditional operator suggestion might work within the constraints of your curious question, but it can get a little hard to decipher when you start nesting them for many such conditions. Derek Lake's switch idea will work, but then it is also a "control statement".
If the input in question are integers within a sufficiently small range, another method is to define functions to do each task, then store function pointers in an array. You then use the input to obtain the array element that is the function pointer, then call the given function. However, this might be a little beyond someone "at the beginners level".