Computers and Technology, 21.03.2020 07:03, janetexcoelho
Tiffany is writing a program to help manage a bake sale. She writes the following code which prompts the user to enter the total number of items a person is buying and then a loop repeatedly prompts for the cost of each item. She wrote the code but there is a problem: it runs in an infinite loop. How can Tiffany change her code so it doesn't loop forever?
0 var numItems = promptNum("How many items?");
1 var total = 0;
2 while (numItems > 0){
3 total = total + promptNum("Enter next item price");
4 }
5 console. log("The total is" + total);
Add after line 3: numItems = numItems - 1;
What value will be displaye
Answers: 2
Computers and Technology, 23.06.2019 13:30, carolelai08
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
Computers and Technology, 23.06.2019 20:30, lucywood2024
What is the biggest difference between section breaks and regular page breaks
Answers: 1
Tiffany is writing a program to help manage a bake sale. She writes the following code which prompts...
History, 07.10.2020 23:01
Chemistry, 07.10.2020 23:01
Mathematics, 07.10.2020 23:01
Mathematics, 07.10.2020 23:01