Computer Science, asked by elvy07michael, 2 months ago

Write a program in Java to accept the number of days and display it after

converting into number of years, number of months and number of days.​

Answers

Answered by itzrithvik
80

Explanation:

Java Program to Convert a Given Number of Days in terms of Years, Weeks & Days

public class Year_Week_Day.

int m, year, week, day;

Scanner s = new Scanner(System.

System. out. print("Enter the number of days:");

m = s. nextInt();

year = m / 365;

m = m % 365;

System. out. println("No. of years:"+year);

Answered by taxef2002
1

Answer:

Write a program in Java to accept the number of days and display it after

answer public class Year_Week_Day.

int m, year, week, day;

Scanner s = new Scanner(System.

System. out. print("Enter the number of days:");

m = s. nextInt();

year = m / 365;

m = m % 365;

System. out. println("No. of years:"+year);

Similar questions