Ask Question
25 October, 10:47

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

+5
Answers (1)
  1. 25 October, 11:30
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers