Ask Question
17 October, 23:29

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. 17 October, 23:56
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers