Skip to content

Instantly share code, notes, and snippets.

@umair13adil
Created January 19, 2020 10:14
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 umair13adil/5f57e56dae8467c39479a661d0a531b3 to your computer and use it in GitHub Desktop.
Save umair13adil/5f57e56dae8467c39479a661d0a531b3 to your computer and use it in GitHub Desktop.
void main() {
var my_value = true;
if(my_value == true){
print("My value is True");
}else{
print("My value is False");
}
var my_result = 2+5;
if(my_result > 7){
print("Value is greater than 7: $my_result");
}else if(my_result == 7){
print("Value is equal to 7: $my_result");
}else{
print("Value is samller: $my_result");
}
}
void main() {
var today = "Monday";
switch(today){
case "Monday":
print("Today is Monday.");
break;
case "Tuesday":
print("Today is Tuesday");
break;
case "Wednesday":
print("Today is Wednesday.");
break;
case "Wednesday":
print("Today is Wednesday.");
break;
case "Friday":
print("Today is Friday.");
break;
case "Saturday":
print("Today is Saturday.");
break;
case "Sunday":
print("Today is Sunday.");
break;
default:
print("No idea!");
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment