Answer:
Explanation:
the answer is also in the question. The loop is used to control the number of program execution. So in order not to run forever, the loop should be included inside the loop brackets. Then you can restructure the code as done below.
var numItems = promptNum("How many items?");
var total = 0;
var itemPrice=0;
while (numItems > 0){
itemPrice = promptNum("Enter next item price");
total = total + itemPrice;
numItems = numItems - 1;
}
console.log("The total is" + total);
The value to be displayed will be the total of the item prices inputted.
Answer:
Declaration for function 1:
void printHeading(String heading);
Declaration for function 2:
int yearPage(int currentYear, int birthYear);
Declaration for function 3:
void printable(String [] names, int [] birthDays, int size);
Explanation:
Prototypes of any function includes its return type followed by its name followed by list of arguments used by it enclosed within parenthesis.
Syntax for method declaration:
return_type function_name (list_of_arguments);
Audio Engineers
Interpreters and Translators
Video Game Testers
Technical Support Specialists
Marketing Managers
Market Research Analysts
Sales Representatives