Question: Codio - LAB - 7 . 1 . 2 Friends 2 Assignment name: ArrayList en Buffett's P . . . Countdown to FO . .

Codio - LAB -7.1.2 Friends2
Assignment name: ArrayList
en Buffett's P...
Countdown to FO...
Crude Oil Prices T...
it 7- ArrayList -> Topic 7.2- ArrayList Methods
7.2.2 FirstAndLast
Write a program that will prompt the user for a list of decimal numbers. The program should stop prompting for and entering numbers when the user enters 0. After the user has entered all of their numbers, the program should print how many numbers were entered (not counting the 0), the first number and the last number. The numbers entered may be different, however, format and label the output just as you see in this sample run:
Enter a decimal number ( to quit): 8.5
Enter a decimal number ( to quit): 9
Enter a decimal number ( to quit): 5.46
Enter a decimal number ( to quit): 75.1
Enter a decimal number ( to quit): 18.75
Enter a decimal number ( to quit): .25
Enter a decimal number ( to quit):
There are 6 numbers in your list.
First number is: 8.5
Last number is: .25
**USE JAVA** I ONLY KNOW FOR LOOPS, ENHANCED FOR LOOPS, WHILE LOOPS, AND IF LOOPS. KEEP IT SIMPLE Click on Check Itl to test your program.
ark as Completed
 Codio - LAB -7.1.2 Friends2 Assignment name: ArrayList en Buffett's P...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!