Ask Question
5 March, 21:05

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.

+1
Answers (1)
  1. 6 March, 00:16
    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?
Get 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 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