void main() {
// write a variable for twar
int year = 2024; // you can change this to any year you want to check
//using ternary operator to check for leap year
String results = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))
? "$year,is a leap year "
: "$year,not a leap year";
//print this result
print(results);
//results show terminal
//thanks you
//please subscribe my channel and like this video thanks
}
Posted inFlutter