Skip to content

Instantly share code, notes, and snippets.

@tvl83
Created August 4, 2017 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvl83/cc73a7ab72feacbda3db10d4fd9f7c77 to your computer and use it in GitHub Desktop.
Save tvl83/cc73a7ab72feacbda3db10d4fd9f7c77 to your computer and use it in GitHub Desktop.
purely aesthetic but this is what i mean about the formatting of the case statement.
switch(name){
case '/':
result = (float)x / (float)y;
printf("&.3f\n");
break;
case '*':
result = (float)x * (float)y;
printf("&.3f\n");
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment