Skip to content

Instantly share code, notes, and snippets.

@matifdeveloper
Created January 30, 2024 06:20
Show Gist options
  • Save matifdeveloper/7f18124357ccb6b26f81761022958d24 to your computer and use it in GitHub Desktop.
Save matifdeveloper/7f18124357ccb6b26f81761022958d24 to your computer and use it in GitHub Desktop.
Birth Year calculator

Birth Year calculator

Created with <3 with dartpad.dev.

void main() {
// Assuming the current year is 2024
int currentYear = 2024;
// Age input
int age = 4;
// Calculate birth year
int birthYear = currentYear - age;
// Print the result
print("If the age is $age, then the birth year is $birthYear.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment