Skip to content

Instantly share code, notes, and snippets.

@schweigert
Created October 20, 2015 15:02
Show Gist options
  • Select an option

  • Save schweigert/4981f1711a4028735d78 to your computer and use it in GitHub Desktop.

Select an option

Save schweigert/4981f1711a4028735d78 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main (void){
int d = 8;
switch (d){
case 1:
c=a+b;
break;
case 2:
c=a-b;
break;
case 3:
c=a*b;
break;
case 4:
c=a/b;
break;
default:
c = d;
}
printf ("%d", c);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment