import java.io*;
public class days
{
public static void main ( )
{
int a=455;
int b,y,m,d;
y=a/365;
b=a%365;
m=b/30;
d=b%30;
System.out.println("The no. of years ="+y);
System.out.println("The no. of months ="+m);
System.out.println("The no. of days ="+d);
}
}
Expected output:
The no. of years=1
The no. of months=3
The no. of days=0
public class days
{
public static void main ( )
{
int a=455;
int b,y,m,d;
y=a/365;
b=a%365;
m=b/30;
d=b%30;
System.out.println("The no. of years ="+y);
System.out.println("The no. of months ="+m);
System.out.println("The no. of days ="+d);
}
}
Expected output:
The no. of years=1
The no. of months=3
The no. of days=0