Ask Question
15 August, 14:20

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.

+2
Answers (1)
  1. 15 August, 15:05
    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 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