Ask Question
13 April, 15:21

What will futureValue contain after the for loop has been executed one time? var years = 10; var annualRate = 10; var futureValue = 1000; annualRate = annualRate / 100; for (i = 1; i < = years; i++) { futureValue + = futureValue * annualRate; }

+1
Answers (1)
  1. 13 April, 15:47
    0
    One time executed for loop value is "1100".

    Explanation:

    In the given jа vascript program, three variable "years, annualRate and futureValue is declare, in which all variable assign a value, that is "10, 10, and 1000".

    In the next step, a variable annualRate divides its value by 100 so, it will give "0.1", then a for loop is declare, that uses variable i, which starts from 1 and ends when the value of i is less than equal to years variable, but in this program, there is no need of loop. Inside the loop, the future variable calculates the value and to print its value there we use print method to print its value, that is equal to "1100".
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What will futureValue contain after the for loop has been executed one time? var years = 10; var annualRate = 10; var futureValue = 1000; ...” in 📙 Computers & Technology 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