rodMorMTL

cc_switch_example

Oct 20th, 2021 (edited)
1,021
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cc_switch_example (int n){
  2. /*sample module using switch*/
  3.     if (>0){
  4.         switch(n){
  5.             case 0: case 1: printf("zero or one\n");
  6.                     break;
  7.             case 2: printf ("two\n");
  8.                     break;
  9.             case 3: case 4: printf("three or four\n");
  10.                     break;
  11.             }
  12.         }
  13.     else
  14.         printf("negative\n");
  15. }
RAW Paste Data