Created
January 19, 2020 10:14
-
-
Save umair13adil/5f57e56dae8467c39479a661d0a531b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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