I am composing a program which allows me to calculate a person's age in days- accounting for every day including leap days, and irregular number of days in months. Here is a line of code:
number_of_days = (((year2 - year1) * 12) + (month2 - month1)) * 30.4375 + (day2 - day1) I got the value 30.4375 by dividing 365.25 by 12.
Now I only need to store the integer part in number_of_days. How do I do that?
Help is really appreciated!
P.S. All variable values are int values