I'll try that, but I also randomized the cases output and returned a random value, not n. I got the same results. For example:Originally Posted byDave_Sinkula

Code:int if_else_proc(int n) { if(n == 0) {return 6;} else if(n == 4) {return 1002;} else if(n == 1) {return 234;} else if(n == 3) {return 546;} else if(n == 2) {return 980;} else {return -1;} } int switch_proc(int n) { switch(n) { case 0: return 6;break; case 4: return 1002;break; case 1: return 234;break; case 3: return 546;break; case 2: return 980;break; default: return -1;break; } }