Days Calculation

Solution :


import java.util.*;
public class TestClass {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int days = num%30;
int month = num/30;
System.out.println(num+" days");
System.out.println("Month="+month);
System.out.println("Days="+days);
}
}

Post a comment

0 Comments