[Solved] Create a java do-while loop that asks the user to enter two numbers

$25

File Name: Create_a_java_do-while_loop_that_asks_the_user_to_enter_two_numbers.zip
File Size: 631.14 KB

SKU: [Solved] Create a java do-while loop that asks the user to enter two numbers Category: Tag:
5/5 - (1 vote)

Create a java do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again. If so, the loop should repeat; otherwise it should terminate

Sample Run1

Enter two numbers: 3 15

Do you want another operation: Yes

Enter two numbers: 45 56

Do you want another operation: No

Output1: Sum = 119

Sample Run2

Enter two numbers: 33 150

Do you want another operation: Yes

Enter two numbers: -56 56

Do you want another operation: Yes

Enter two numbers: 58 15

Do you want another operation: Yes

Enter two numbers: 123 87

Do you want another operation: No

Output2: Sum = 466

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Create a java do-while loop that asks the user to enter two numbers
$25