# Program to convert days into years

Program to convert days into years on fibonacci, factorial, prime, armstrong, swap, reverse, search, sort, stack, queue, array, linkedlist, tree, graph etc.

## Program to convert days into years

### Explanation

Well, 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

1. Define the number of days to convert into years.
2. Apply in the formula.
3. Print the number of years.

O(1)

### Python

```days= 5555
years= days / 365
print("Number of years is: ");
print(years);
```

Output:

```Number of years is: 15
```

### C

```#include<stdio.h>
int main()
{ int days, years;
days= 543;
years=  days / 365;
printf("\n\n Number of years is : %d",years);
return (0);
}
```

Output:

```Number of years is: 1
```

### JAVA

```public class Main
{
public static void main (String args[])
{	int days, years;
days = 799;
years = days / 365;
System.out.println("Number of years is:"+years);
}}
```

Output:

```Number of years is: 2
```

### C#

```using System;
class main
{   static void Main()
{
int days, years;
days =6788;
years = days / 365;
Console.WriteLine("Number of years is: "+years);
}}
```

Output:

```Number of years is: 18
```

### PHP

```<?php
\$days = 4446 ;
\$years = (\$days)/365 ;
echo("Number of years is:  ");
echo(\$years);
?>
```

Output:

```Number of years is:  12
```

Next Topic#