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

Assignment Active Determining the Final Cost of an Item The tax rate as a percent, r, charged on an item can be determined using the formula - 1 = r, where c is
What important ecological roles do mountains play?
What is a improper fraction of 2 4/15
Question in photo (:
Lance took 34 photos each day of his vacation.He was on vacation for 2 days .Which equation describes how many photos he took in all?​
If the treatment has a very small effect, then what is the likely outcome for a hypothesis test evaluating the treatment? a) a Type I error b) a Type II error
what is mode mean median ?
Use some of the digits 1,3,5,7,9 only once to write 5 numbers less than 2000
. Through the process of photosynthesis, a century plant uses sunlight to make food. The equation below shows this process. Light Energy + Carbon Dioxide +Water
I have been cleaning cars for 35 minutes. I have completed 6 cars how many minutes did it take me to clean 1 car