Computer Science, asked by hrik21, 1 year ago

JAVA PROGRAM

write a program to store 5 years 2 months in a variable. write a program to calculate and display total days......

Answers

Answered by QGP
3
public class JAVA
{
   public static void main(String[] args)
   {
       int y,m,d=0;
       y=5;
       m=2;
       d=(y*365)+(m*30);
       System.out.println("Number of days is: "+d);
   }
}
Answered by shikha2019
3
this helps you✌️✌️.....
Attachments:
Similar questions