+ 3
What is wrong within this code?
//TODO code application logic here Scanner var= new Scanner(System.in); int pin; double initial, amount, sum, diff; int choice; initial = 5000.00; System.out.println("Enter your pin:"); pin=var.nextInt(); { choice=var.nextInt(); while(true) { .... int n = var.nextInt(); switch(n) { case 1: System.out.print("Enter Amount To Be Deposit:"); sum = var.nextInt(); if(initial<10000) ....
11 Respuestas
+ 2
https://code.sololearn.com/c8uYoWs89j1w/?ref=app
Maybe 4 input
+ 1
Delete the spike bracket above choice=var.nextInt();
Also change sum = var.nextInt(); to
sum = var.nextDouble(); var.nextInt() will work for a double but there will be an error for user input if they enter a double.
+ 1
I'm afraid it doesn't work that way
+ 1
? Well, im only going off what im given
+ 1
Well the first one doesn't work, and i still didn't work with the 2nd and thirda one, but still thanks though. Thank you very much
+ 1
If you post the full code I might be able to find it
+ 1
But there's a limited words in description, so i cannot.
+ 1
Post it like this, you press the plus with the circle, insert code, tap the drop down tab in the corner and go to my codes
https://code.sololearn.com/cl7R92MnWI67/?ref=app
+ 1
Also for testing purposes how many inputs are needed?
+ 1
I edited and commented in it on my pc so copy and paste it and it should work with what im given.
https://code.sololearn.com/c1pNBBy1bKGo/?ref=app
+ 1
If there is anymore problems you can just dm me or continue to post here