Computer Science, asked by shinchan142, 10 months ago

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 god55
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 kavitasingh1234
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