Test Case 1 How many integers do you have? (Max 20) \n 3 ENTER Enter element for subscript 0\n 50 ENTER Enter element for subscript 1 \n 60 ENTER Enter element for subscript 2 \n 70 ENTER Here are all...

When the program says How many integers do you have? (Max 20), ensure that only a number between 1 and 20 is entered. If the input is outside that range, then print a message and end the program and make the sum of the number is displayed Write in Java and use test case as an example result.
Test Case 1<br>How many integers do you have? (Max 20) \n<br>3 ENTER<br>Enter element for subscript 0\n<br>50 ENTER<br>Enter element for subscript 1 \n<br>60 ENTER<br>Enter element for subscript 2 \n<br>70 ENTER<br>Here are all of those numbers \n<br>50 \n<br>60 \n<br>70 \n<br>The sum of these numbers is 180 \n<br>Test Case 2<br>How many integers do you have? (Max 20) \n<br>5 ENTER<br>Enter element for subscript 0 \n<br>20 ENTER<br>Enter element for subscript 1 \n<br>10 ENTER<br>Enter element for subscript 2 \n<br>30 ENTER<br>Enter element for subscript 3 \n<br>40 ENTER<br>Enter element for subscript 4 \n<br>50 ENTER<br>Here are all of those numbers \n<br>20 \n<br>10 \n<br>30 \n<br>40 \n<br>50 \n<br>The sum of these numbers is 150 \n<br>

Extracted text: Test Case 1 How many integers do you have? (Max 20) \n 3 ENTER Enter element for subscript 0\n 50 ENTER Enter element for subscript 1 \n 60 ENTER Enter element for subscript 2 \n 70 ENTER Here are all of those numbers \n 50 \n 60 \n 70 \n The sum of these numbers is 180 \n Test Case 2 How many integers do you have? (Max 20) \n 5 ENTER Enter element for subscript 0 \n 20 ENTER Enter element for subscript 1 \n 10 ENTER Enter element for subscript 2 \n 30 ENTER Enter element for subscript 3 \n 40 ENTER Enter element for subscript 4 \n 50 ENTER Here are all of those numbers \n 20 \n 10 \n 30 \n 40 \n 50 \n The sum of these numbers is 150 \n
Test Case 3<br>How many integers do you have? (Max 20) \n<br>5ENTER<br>Enter element for subscript 0\n<br>4JENTER<br>Enter element for subscript 1\n<br>3 ENTER<br>Enter element for subscript 2 \n<br>2 ENTER<br>Enter element for subscript 3 \n<br>S ENTER<br>Enter element for subscript 4 \n<br>6 ENTER<br>Here are all of those numbers \n<br>4 \n<br>3 \n<br>2 \n<br>6 \ni<br>The sum of these numbers is 20 \n<br>

Extracted text: Test Case 3 How many integers do you have? (Max 20) \n 5ENTER Enter element for subscript 0\n 4JENTER Enter element for subscript 1\n 3 ENTER Enter element for subscript 2 \n 2 ENTER Enter element for subscript 3 \n S ENTER Enter element for subscript 4 \n 6 ENTER Here are all of those numbers \n 4 \n 3 \n 2 \n 6 \ni The sum of these numbers is 20 \n

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here