Ask Question
15 June, 03:50

Given an int variable k that has already been declared, use a while loop to print a single line consisting of 88 asterisks. Use no variables other than k.

k=1;

while (k<=88) {

System. out. print ('*');

k++;

}

System. out. println (); T/F

+2
Answers (1)
  1. 15 June, 06:29
    0
    True

    Explanation:

    The while loop is going to be executed until the condition is false.

    Since k is initially equal to 1, the loop will execute 88 times. One asterisk will be printed and k will be incremented by one during each iteration.

    When k becomes 89, the condition will be false (89 is not smaller or equal to 88) and the loop will stop.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Given an int variable k that has already been declared, use a while loop to print a single line consisting of 88 asterisks. Use no ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers