5
answers
0
watching
569
views
4 Jan 2018
23. Write a program which takes the average of all of the non-negative command line arguments and then prints the result. Your program must call the methods you wrote in the previous questions. For example, if someone runs the program by typing run Midterm 5 6 10 0 -4 into Dr. Java (or java Midterm 5 6 10 0 - 4 from the command line), your program should print 5.25. You may assume that the person running your program types in integers as command line arguments and also that at least one of the numbers typed at the command prompt is non-negative.
23. Write a program which takes the average of all of the non-negative command line arguments and then prints the result. Your program must call the methods you wrote in the previous questions. For example, if someone runs the program by typing run Midterm 5 6 10 0 -4 into Dr. Java (or java Midterm 5 6 10 0 - 4 from the command line), your program should print 5.25. You may assume that the person running your program types in integers as command line arguments and also that at least one of the numbers typed at the command prompt is non-negative.
3 Jun 2023
Casey DurganLv2
6 Jan 2018
Already have an account? Log in