Where is this error code? how many years will his deposit in the bank double? Deposits and interest takes from user | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Where is this error code? how many years will his deposit in the bank double? Deposits and interest takes from user

public class Program import java.util.Scanner; { public static void main(String[] args) { double deposit,interest,year=1; Scanner input=new Scanner(System.in); System.out.println ("enter your deposit amont); deposit = input.nextInt(); System out println ("enter the amount of interest on your deposit); interest= input.nextInt(); while(deposit==deposit*2){ deposit=deposit*interest; year++; } System out println (year+"years"); } }

12th Jun 2020, 6:40 PM
saina
3 Answers
0
Show your code and explain it well.
12th Jun 2020, 6:45 PM
$ยข๐Žโ‚น๐”ญ!๐จ๐“
$ยข๐Žโ‚น๐”ญ!๐จ๐“ - avatar
0
y would i do ur homeowrk
12th Jun 2020, 7:11 PM
YoBoi
0
move import to first line add dots to System.out.println close "quotations" probably second input assign to interest
12th Jun 2020, 7:41 PM
zemiak