Skip to content

Instantly share code, notes, and snippets.

@219010328
Created April 5, 2022 21:28
Show Gist options
  • Save 219010328/f937047c09ff8f3bdc9db14925debb53 to your computer and use it in GitHub Desktop.
Save 219010328/f937047c09ff8f3bdc9db14925debb53 to your computer and use it in GitHub Desktop.
Exercise2.DartVideos
void Main() {
String slogan = 'McDonal\'s - best burgers ever!';
print(slogan.toLowerCase());
print(slogan.toUpperCase());
print(slogan.contains('best'));
print(slogan.replaceAll('burgers','breakfast muffin'));
print("**********************************");
String childAge = '7';
double temp = 32.768;
print('Next year the child will be ${int.parse(childAge) + 1} years old');
print('Today the temperature is ${temp.round()} degree celsius');
print('************************************************');
double weight = 90.5;
double hight = 1.92;
print('Someone with a weight of $weight and is ${hight}m tall will have the BMI of ${weight / (hight*hight).round()};');
print('****************************************************');
int a = 5;
int b = a--;
int c = ++b;
int d = b += 2;
print("""
a=$a
b=$b
c=$c
d=$d
""");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment