+ 1
Can help me to correct this programe. Shows some error
import java.util.Scanner; public class java{ public static void main( String args[]){ Scanner madhu = new Scanner (System.in); double fnum, snum, answer; System.out.println("Entre First No: "); fnum = madhu.nextdouble(); System.out.println("Enter Second no:"); snum = madhu.nextdouble(); answer = fnum + snum; System.out.println(answer); } }
11 Respuestas
+ 7
@madhu change nextdouble() to nextDouble()
+ 4
its working perfectly see.....
https://code.sololearn.com/cXVV8q8Fqwar/?ref=app
+ 4
can you tell me what you are inputting and in which way
+ 1
may be my software not working propely. thnx
i got much information from you. thanks Sir,
+ 1
my out put shows
Enter First No:
Enter Second No:
Exception in thread "main"
java.util.NoSachElementException
at java.util.Scanner.throwFor(Unknow
Source)
at java.util.Scannner.next(Unknow
Source)
at java.util.Scanner.nextDouble(Unknow
Source)
at madhu.main(madhu.java:12)
plz tell me watz the problem
+ 1
anyone can help?
0
import java.util.Scanner;
public class madhu{
public static void main(String args[]){
Scanner mass = new Scanner (System.in);
double fnum, snum, answer;
System.out.println("Entre First No:");
fnum = mass.nextDouble();
System.out.println("Enter Second No:");
snum = mass.nextDouble();
answer = fnum + snum;
System.out.println(answer);
}
}
still not working
0
watever u send me link, i opened.
my output shows as mention above
0
its working perfectly see.....
https://code.sololearn.com/cXVV8q8Fqwar/?ref=app
0
i typed like this
https://code.sololearn.com/cXVV8q8Fqwar/?ref=app
0
may be my software problem