Skip to content

Instantly share code, notes, and snippets.

@onumanfj
Created June 19, 2023 17:11
Show Gist options
  • Save onumanfj/4a5fff8bc1a8cdaabfce9b79d4281196 to your computer and use it in GitHub Desktop.
Save onumanfj/4a5fff8bc1a8cdaabfce9b79d4281196 to your computer and use it in GitHub Desktop.
dart - conditions
import 'dart:math';
void main() {
loveCalculator();
}
void loveCalculator() {
int loveNumber = Random().nextInt(100) + 1;
print(loveNumber);
if (loveNumber > 70) {
print('You are in love');
} else if (loveNumber < 70 && loveNumber > 30) {
print('You like each other');
} else {
print('You don\'t like each other');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment