Hi.
I have a problem to solve this condition :
In a struct data are known the registration number of the person(consisting of 5 digits), the year, the day, and month of birth. We also know the number of people wich is n, the current month and day(wich are outside the struct). We should output the people that celebrated their birthday this year.
I want to know how to compare the years and how to work with them without any functions.
Here is a attempt but i doubt it could help :
if ((birthMonth < currentMonth) ||
((birthMonth == currentMonth) &&
(birthDayOfMonth <= currentDayOfMonth))
{
// the person already celebrated a birthday this year
// do whatever needs to be done
}
Beyond this help, I would be doing your homework for you.