Skip to content

Instantly share code, notes, and snippets.

@WPDC
Last active December 14, 2015 02:26
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 WPDC/67f053c420c0b89ee1b2 to your computer and use it in GitHub Desktop.
Save WPDC/67f053c420c0b89ee1b2 to your computer and use it in GitHub Desktop.
CS0110 3.4 In Languages
switch ( weatherCondition ) {
case 'sunny':
printf("go for a walk");
break;
case 'raining':
printf("dance in the rain");
break;
case 'foggy':
printf("sound the fog horn");
break;
case 'snowing':
printf("build a snowman");
break;
default:
printf("read a book”);
}
switch ( weatherCondition ) {
case "sunny":
document.write("go for a walk");
break;
case raining":
document.write("dance in the rain");
break;
case "foggy:
document.write("sound the fog horn");
break;
case "snowing":
document.write("build a snowman");
break;
default:
document.write("read a book”);
}
switch ( $weatherCondition ) {
case 'sunny':
echo 'go for a walk';
break;
case 'raining':
echo 'dance in the rain';
break;
case 'foggy':
echo 'sound the fog horn;
break;
case 'snowing':
echo 'build a snowman';
break;
default:
echo 'read a book';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment