We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
TbooleanVALUE showNUMBER ( int number ) { switch (number) { case 0: printf("0"); break; case 1: printf("1"); break; case 2: printf("2"); break; case 3: printf("3"); break; case 4: printf("4"); break; case 5: printf("5"); break; case 6: printf("7"); break; case 7: printf("8"); break; case 8: printf("9"); break; case 9: printf("9"); break; } if ( number > 5 ) return FALSE ; if ( number < 2 ) return TRUE; return 2; }
What value are you passing to the function?
If you give it a value of 2, 3, 4 or 5 then the function should return 2.
What are TRUE and FALSE defined as? A boolean is normally used to represent YES or NO, TRUE or FALSE. It is not (normally) used to return YES or NO or 'something else'.