Source Code
class monthsanddays { public static void main(String s[]) { int no,mo,do; system.out.println("Enter the number:"); no=Integer.parseInt(s[0]); mo=no/30; do=no%30; System.out.println(no+" days"+" = "+mo+" months "+"and "+do+" days"); } }
Output
0 comments:
Post a Comment