+ 1

Where is the wrong here?

package Java; impor java.util.Scanner; public class Assignment; { public static void main(String[] args) { string name; double age; double days=365; double months=12; double hours=8760; Scanner input=new Scanner(System.in); System.out.println ("Enter your name"); name =input.nextline(); System.out.println("Enter your age"); age=input.nextdouble; System.out.println("Wellcome"+name); months=months*age; System.out.println("The age by months is"+months); days=days*age; System.out.println("The age by days is"+days); hours=hours*age; System.out.println("The age by hours is"hours); } System.out.println("The age by months "+months); days=days*age; System.out.println("The age by days "+days); hours=hours*age; System.out.println("The age by hours "hours); } }

2nd Jun 2021, 8:44 PM
Nazik Aljilee
3 Réponses
+ 4
There are quite many things which you forgot. More can you check in this code: https://code.sololearn.com/c817TUKC1FPP/?ref=app
2nd Jun 2021, 9:02 PM
JaScript
JaScript - avatar
+ 2
** You forgot to put a "+" in the line : System.out.println("The age by hours "hours); ** and input.nextdouble() it should be input.nextDouble()
2nd Jun 2021, 8:56 PM
zak00aria
zak00aria - avatar
+ 1
JaScript Thanks indeed🙏😩💙
3rd Jun 2021, 4:15 AM
Nazik Aljilee