java program
write a class to input a name of a person and age in two separate variables using scanner class. convert age in class (1 year=365 days) and print the same.
Answers
Answered by
0
Answer:
import java.util.*;
class Main{
public static void main (String args[])
{
Scanner sc=new Scanner(System.in);
String name=sc.nextLine();
int age=sc.nextInt();
int yr=age*365;
System.out.println(yr);
}
}
Explanation:
Hope you understood.
Please rate brainliest accordingly.
Similar questions