Menu

Write Program Uses Scanner Object Read Positive Integer N Using Loop Choice Type Read N I Q43895359

Write a program that uses a Scanner object to read in a positive integer (N). Then using a loop (your choice on type) read inUse java to answer that please

Write a program that uses a Scanner object to read in a positive integer (N). Then using a loop (your choice on type) read in N invoice totals (doubles) from Dalhousie’s Bookstore. After reading in all the invoices, print the total of all the invoices and the average of all the invoices (don’t worry about controlling for decimal places). Examples Sample Input (on one line) 3 9.15 12.40 22.50 Sample Output $44.05 $14.683333333333332 5 14.30 7.05 19.35 25.80 56.90 $123.4 $24.68 Show transcribed image text Write a program that uses a Scanner object to read in a positive integer (N). Then using a loop (your choice on type) read in N invoice totals (doubles) from Dalhousie’s Bookstore. After reading in all the invoices, print the total of all the invoices and the average of all the invoices (don’t worry about controlling for decimal places). Examples Sample Input (on one line) 3 9.15 12.40 22.50 Sample Output $44.05 $14.683333333333332 5 14.30 7.05 19.35 25.80 56.90 $123.4 $24.68

Expert Answer


Answer to Write a program that uses a Scanner object to read in a positive integer (N). Then using a loop (your choice on type) re…

OR