Convert the do-while loop in the following code to a while loop: Scanner keyboard = new Scanner(System.in);
Question:
Convert the do-while loop in the following code to a while loop:
Scanner keyboard = new Scanner(System.in);
String input;
char sure;
do
{
System.out.print("Are you sure you want to quit? ");
input = keyboard.next();
sure = input.charAt(0);
} while (sure != 'Y' && sure != 'N');
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 90% (10 reviews)
import javautilScanner class main public static ...View the full answer
Answered By
Marvine Ekina
Marvine Ekina
Dedicated and experienced Academic Tutor with a proven track record for helping students to improve their academic performance. Adept at evaluating students and creating learning plans based on their strengths and weaknesses. Bringing forth a devotion to education and helping others to achieve their academic and life goals.
PERSONAL INFORMATION
Address: , ,
Nationality:
Driving License:
Hobbies: reading
SKILLS
????? Problem Solving Skills
????? Predictive Modeling
????? Customer Service Skills
????? Creative Problem Solving Skills
????? Strong Analytical Skills
????? Project Management Skills
????? Multitasking Skills
????? Leadership Skills
????? Curriculum Development
????? Excellent Communication Skills
????? SAT Prep
????? Knowledge of Educational Philosophies
????? Informal and Formal Assessments
0.00
0 Reviews
10+ Question Solved
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Question Posted:
Students also viewed these Computer science questions
-
Consider the following sequence of defective parts (d) and nondefective parts (n) produced by a machine. Can we reject the hypothesis of randomness at a = 0.05 ? nnndnnnnnd n n n nnd n d n n n
-
For the collar of Problem 2.35, determine (a) The required value of if the resultant of the three forces shown is to be vertical, (b) The corresponding magnitude of the resultant. 30 100 N 200 N 150...
-
Assignment 5: Hash Table implementation andconcordance There are three parts to this assignment. In the first two parts,you will complete the implementation of a hash map and aconcordance program. In...
-
Conduct an internal and external analysis of yourself in the current business industry. examples: you are an accounting major so your environment is the cpa job market. you are a finance major so...
-
Upon starting your new job after college, you've been confronted with selecting the investments for your 401(k) retirement plan. You have four choices for investing your money: A money market fund...
-
A Mansard roof truss is loaded as shown. Determine the force in members DF, DG, and EG. 12 EN 12 kN 12 KN 1.2 kN 12 kN 4m- 2.25 m 225 m
-
The adjusted trial balance for CED Electric, Inc., as of June 30, 2010, is presented next: Requirements 1. Prepare the multi-step income statement for June for CED Electric, Inc. 2. Calculate the...
-
George Zegoyan and Amir Gupta face a difficult decision. Their private auto parts manufacturing company has been a great success - too quickly. They cannot keep up with the demand for their product....
-
As a financial security analyst consider BondAthat has just been issued. Its face value is $1,000with coupon rate of 5% and matures in10 years. BondBwas issued 5 years ago, when interest rates were...
-
A firm needs to fully satisfy the demand, which is fixed to 900 units and generates unit revenue of $10. However, its production is subject to the random yield. That is, only a random percentage of...
-
The do-while loop is this type of loop. a. Pretest b. Posttest c. Prefix d. Postfix
-
Which loop should you use when you know the number of required iterations?
-
List the key objectives of a transaction processing system?
-
. Explain the following: a) The Tiebout Model b) Tools of Redistribution c) School Finance Equalization
-
Best Buy offers quantity discounts on Wireless Noise Cancelling headphones. The price for the first 30 Headphones is $40.00 per Headphone. After the first 30, all additional Headphones purchased, are...
-
Merger Analysis FIN490 | Understanding Merger Transactions Links to an external site. and FIN490 | Valuing Synergies in Transactions Links to an external site.. In your journal, Explain what the...
-
PolyProduction Inc. has two classes of common stock. Class A has 5 million shares with 10 votes per share. Class B has 5 million shares with 1 vote per share. If the dividends per share are equal for...
-
Reba the robot and Amby the automatic mopper each travel along the surface of the Earth from Ksar Kaddour, Algeria (at 30 N, 0 E) to Kikorongo, Uganda (at 0 N, 30 E). Reba travels at a constant speed...
-
In an injection molding procedure plastic parts are produced by injecting the plastic material into a mold. Some variability is experienced in the resulting weight (or equivalently density) of the...
-
Chris Zulliger was a chef at the Plaza Restaurant in the Snowbird Ski Resort in Utah. The restaurant is located at the base of a mountain. As a chef for the Plaza, Zulliger was instructed by his...
-
Design a program that lets the user enter the total rainfall for each of 12 months into a list. The program should calculate and display the total rainfall for the year, the average monthly rainfall,...
-
Assume scores is a list of randomly-ordered numbers between 0 and 100. Write code that sorts the list, reverses the order of the items in the list, and prints the biggest value in the list.
-
What will the following code display? values = [2, 4, 6, 8, 10] print(values[1:3])
-
Needs Analysis : The analysis of the information gathered on the community military veterans and mental health. This will provide a conclusions you have drawn from thinking about the findings you...
-
How do I calculate the Portfolio Expected Return: You own aportfolio that has $4,600 invested in Stock X and $5,200 investedin Stock Z. What is the expected return on the portfolio if theexpected...
-
Students are asked to assume that during an advanced degree program, they thoroughly studied and reviewed the most popular personality tests used by companies as selection techniques. Students are...
Study smarter with the SolutionInn App