137k views
3 votes
Given an int variable k that has already been declared , use a do...while loop to print a single line consisting of 53 asterisks. use no variables other than k.

User SalmaFG
by
6.2k points

1 Answer

2 votes
do {
System.out.print("*");
k++;
} while(k < 53);
User Andrew Arthur
by
6.0k points