rylieisboss9787 rylieisboss9787
  • 20-08-2019
  • Computers and Technology
contestada

What is the value of variable num after the following code segment is executed?

var num = 10;

while ( num <10)
{

num = num +1;

}

Respuesta :

Mustela Mustela
  • 24-08-2019

Answer:

num=10

Explanation:

Initial value of variable "num" is 10. When while loop execute for the first time,it checks the condition (num<10) and founds this FALSE. So the statement inside the while loop will not be executed. If while loop doesn't execute then it will not going to change the value of "num". That is why the value of "num" will remain same i.e. num=10.

Answer Link

Otras preguntas

What is 23.67 million in terms of billions?
You are working on your conclusion, but you're having trouble signaling closure. Which of the following strategies will help you with that?
What was one action that was taken by the First Continental Congress?
products of exponents plz help i have benn trying for 4 hour
2x+52=6x+8 solve for x
In krissy’s collection, there are 15 action movies and 21 comedies. What is the ratio of qualities to action movies in Krissy’s collection? A) 5:7 B) 1:15 C) 15
What is the minimum value of the function g(x) =x2-6x-12?
A tree is 7 ft tall when it is planted and this type of tree grows two feet per year. How tall will the tree be in 6 years? How long will it take for the tree
Which of the following is not a way in which rivers and lakes influence the United States? a. These bodies of water are all fresh water, which allows the United
Which geographic area had the most population ? Colony of Georgia, Mississippi River, Ohio river, Eastern coast?