Created with <3 with dartpad.dev.
Created
January 30, 2024 06:20
-
-
Save matifdeveloper/7f18124357ccb6b26f81761022958d24 to your computer and use it in GitHub Desktop.
Birth Year calculator
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() { | |
// 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