Skip to content

Instantly share code, notes, and snippets.

@WPDC
Last active Dec 14, 2015
Embed
What would you like to do?
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