Hello world! I'm talking about a leap year function in C++. There are a couple of things about this program that I want to point out. First of all if you say while or if with just an integer , it will be true if the value is not zero. And it will be false if it is zero. So, this loop that we have, this do loop, asks the user to enter a year and it calls the function and prints out whether it is leap year or not, and the loop keeps going as long as year is true. So the way to end this loop is to type in a zero, that will end the loop, because then year, with a value of zero is false. Next, let's look at the leap year function itself. It is a Boolean function that receives a year And, the method we use here is to assume it's leap year until proven otherwise. And the first test is, It it divisible by, evenly divisible, by four? And we have year % 4, the value of this will be 0, 1, 2 or 3. If it is true, meaning it has a value of 1, 2 or 3, we set leap to false. if yearr % 4 is 0, it means it was evenly divisible by four and it's still possible that it's a leap year. The next test is if the year is divisible by 100, it also has to be divisible by 400. or it's not a leap year. For example 1900 is not a leap year because it's divisible buy 100 but not by 400. The year 2000 is a leap year because it's divisible evenly by both 100 and by 400. And here's the statement that tests for that. and we set leap equal to false. And leap, if we didn't miss any of these conditions, leap is still true and that's the value that gets returned. Let's just run this. And I want to thoroughly test this, but just for this demo, I'm going to put in 1900 which is not a leap year. 2000 which is a leap year. Let's try 2019 which is not leap year. And 2016: which is a leap year, and that's good. and we type in that 0 to end the loop. And that's it!