Write a script that reads in three arguments on the command line and finds their average to two decimal places. Name it
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a script that reads in three arguments on the command line and finds their average to two decimal places. Name it
Write a script that reads in three arguments on the command line and finds their average to two decimal places. Name it avg3. I will run it like: avg3 359 and it will print out: Average of 3, 5, and 9 is 5.67 If I enter something like: * avg3 35 * avg3 3 4 5 6 * avg3 3 one 5 it needs to print an error telling me how to use it.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!