(Solved):Write program in Java, using Sentinell, that takes in names and ages and prints them on the screen and stops when the age 0 is entered. View Answer…

 

Question

Write program in Java, using Sentinell, that takes in names and ages and prints them on the screen and stops when the age 0 is entered.

 

EXPERT ANSWER

Source Code:

  1. //Java program to Read Name & Age
  2. //Stop entering values encountering an age value that is equal to 0
  3. import java.util.*;
  4. public class
Scroll to top