Tuesday, August 10, 2010

Article | Java Program to convert given no of days to Months and equivalent days

Simple Java Program to convert given no of days to Months and equivalent days..


import java.io.*;
class Convert
{
 public static void main(String args[])
 {
  int a=0,f=0,b=0;
  System.out.println(" Enter the no of Days ");
  BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  try
  {
   a=Integer.parseInt(br.readLine());
   f=(a/30);
   System.out.println(" No Of Months "+f+" mnths");
   b=a%30;
   System.out.println(" No of Days "+b);
  }catch(Exception e){}
 }
}
 
Loading...

Comments :

0 comments to “ Java Program to convert given no of days to Months and equivalent days ”

Subscribe

Enter your email address:

Followers

Chicklets

My Zimbio