Can somebody tell me what is wrong with my code?
It seems like the second while is only used once.
So if I add a "1" instead of the free space with my System.out.println("1");
it displays :
$$$$$$$$$$1
1
1
1
1
1
1
1
1
1
I don't really understand why the second while loop is used only once. Arent't they nested properly?
package com.codegym.task.task04.task0433;
/*
Seeing dollars in your future
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int a = 10;
int b = 10;
while (a > 0){
while (b > 0){
System.out.print("$");
b--;
}
System.out.println("");
a--;
}
}
}