subject

What is the sentinel value in the following code snippet?
public static void main(String[] args)
{
int age = 0;
int sum_of_ages = 0;
int stop = 1;
Scanner reader = new Scanner(System. in);
System. out. println("Enter an age (-1 to stop): ");
age = reader. nextInt();
while (age != -1)
{
sum_of_ages = sum_of_ages + age;
System. out. println("Enter an age (-1 to stop): ");
age = reader. nextInt();
}
System. out. println("Sum of ages " + sum_of_ages);
return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
According to alisa miller foreign news bureaus
Answers: 3
question
Computers and Technology, 22.06.2019 15:00
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
You have a small company and want to keep your costs low, but it is important your employees share data. which network would provide you with the most economical solution?
Answers: 1
You know the right answer?
What is the sentinel value in the following code snippet?
public static void main(String[] arg...
Questions
question
Mathematics, 10.08.2019 20:10
Questions on the website: 13722360