What is the value of the variable named counter after the fo…
What is the value of the variable named counter after the following statements are executed?double percent = 0.54;bool valid = true;int counter = 1;if (percent > 0.50 && valid){ counter += 2; if (valid) counter++; else if (percent >= 0.50) counter += 3;}else{ counter++;}
Read DetailsWhat is the value of i the first time the while condition is…
What is the value of i the first time the while condition is executed at the end of the following do-while loop?decimal monthlyInterestRate = .01m;int months = 10;decimal futureValue = 1000m;int i = 1;do{ futureValue = futureValue * (1 + monthlyInterestRate); i++;}while (i < months);
Read Details