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
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
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
Math,
2 months ago
Science,
2 months ago
Physics,
4 months ago
Social Sciences,
10 months ago
Physics,
10 months ago