Ask Question
24 June, 07:34

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

+5
Answers (1)
  1. 24 June, 07:51
    0
    Firstly we declared the variable k which is integer (means give variable a value) and then use do-while iteration (loop) to print asterisks in a single line.

    now the statements will be:

    k = 0;

    do {

    system. out. print ("*");

    k = k + 1;

    }

    while (k < 97);
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 do-while loop to print a single line consisting of 97 asterisks. Use no ...” in 📗 Mathematics 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