write a JavaScript code to input your name and age. If name is 'Divya' and age is '16' then display the statement 'Divya is 16 years old' as output.
Answers
Answered by
0
Answer:
class Name
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
String s=sc.nextLine();
int age=sc.nextInt();
System.out.println(s+"is"+age+"years old");
}
}
Answered by
4
Answer:
class abc
{
public static void main()
{
Scanner sc= new Scanner(System.in);
String a =Divya;
sopln(a+"is 16 year old") ;
}
}
Similar questions