coding a sentinel-controlled do/while loop within a for
sentinel-controlled do/while loop within a for statement
for(int c = 1; c <= teamName; c++)
System.out.printf("\nWhat is the name of team no. %d?", c );
team = input.nextLine();
System.out.printf("\nYou entered %s. Is this correct? Enter 'Y' or 'N':", team );
cont1 = input.next().charAt(0);
Re: coding a sentinel-controlled do/while loop within a for
Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.
One of the purposes of a forum like this is to share what you've learned with others. Since you had a problem and found a solution either on your own or from another source, it may be helpful to someone else someday if you were to NOT delete the original question AND post the solution you've discovered. Otherwise, it's wasted space. Your choice.