in java please and enter the code where it says "enter your code here" their should be 4 of them. Suppose we add a fixed amount of money into our bank account at the beginning of every year. Modify the program from this section to show how many years it takes for the balance to double, given the annual contributions and the interest. import java.util.Scanner; public class PowersOfTwo { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("n: "); int n = in.nextInt(); /* Your code goes here */ while (/* Your code goes here */) { System.out.print(/* Your code goes here */ + " "); /* Your code goes here */ } System.out.println(); } }
in java please and enter the code where it says "enter your code here" their should be 4 of them.
Suppose we add a fixed amount of money into our bank account at the beginning of every year. Modify the
import java.util.Scanner;
public class PowersOfTwo
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("n: ");
int n = in.nextInt();
/* Your code goes here */
while (/* Your code goes here */)
{
System.out.print(/* Your code goes here */ + " ");
/* Your code goes here */
}
System.out.println();
}
}
Step by step
Solved in 4 steps with 4 images