Program to convert days into yearsExplanationWell, we know that one year is the sum of 365 days(non-leap year). So the basic formula to convert days into years is to divide the number of days by number(365). Number of years = (Number of days ) / 365 Algorithm
ComplexityO(1) SolutionPythonOutput: Number of years is: 15 COutput: Number of years is: 1 JAVAOutput: Number of years is: 2 C#Output: Number of years is: 18 PHPOutput: Number of years is: 12 Next Topic# |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India