haleygreene5085 haleygreene5085
  • 09-03-2020
  • Mathematics
contestada

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.

Respuesta :

fahadisahadam
fahadisahadam fahadisahadam
  • 13-03-2020

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 );

Answer Link

Otras preguntas

Which of these techniques was used extensively during World War I? trench warfare guerilla tactics aerial bombing airborne forces
What unresolved issue from WWI led to WWII?
Is coffee creamer an acid or base?
Determine the strength of the electric field of a force of 10N acts on a charge of 2C.
1/6 of 48? PLSE help
please help What was the importance of the Federal Highway Act of 1956? It established tolls on highways, which funded new home construction. It helped boost th
Did Tris ever kill Will? I forgot!
"kim had 120 cards in a box.she gave 6/10 of cards to maddie.how many cards did kim have left in the box"
Which is necessary for a society to be considered a civilization? Choose all answers that are correct. A. the creation of cities B. an education system C. an es
what kind of orbit in which the satellite stays in the same location in the sky