int m = 0; int d = 1; while(m<10) { while(d<10){ System.out.print("$"); d++; } System.out.print("$"); System.out.println(); m++; d=1; }