write a program in Java to accept the number of days and display it after converting it into number of years months and days
Answers
Answered by
92
Answer:
Program:-
import java.util.Scanner;
public class Year_Week_Day
{
public static void main(String args[ ])
{
int m, year, week, day;
Scanner s = new Scanner(System.in);
System.out.print("Enter the number of days:");
m = s.nextInt();
year = m / 365;
m = m % 365;
System.out.println("No. of years:"+year);
week = m / 7;
m = m % 7;
System.out.println("No. of weeks:"+week);
day = m;
System.out.println("No. of days:"+day);
}
}
Explanation:
hope it's help you‼️‼️☑️☑️
Answered by
10
Explanation:
.
.
.
hope it helps
.
.
.
plz Mark me brainlist ☺️
Attachments:
Similar questions
Social Sciences,
6 months ago
Science,
6 months ago
Social Sciences,
6 months ago
Chemistry,
1 year ago
Hindi,
1 year ago
Science,
1 year ago
English,
1 year ago