Write a shell script that takes integer numbers as command line arguments and displays their sum. Use the for-control structure. Show your script and a sample run.
Added by Michael J.
Step 1
sh) in your working directory. You can use any text editor (vi, nano, etc.) or redirect to create it. Show more…
Show all steps
Your feedback will help us improve your experience
Christian Otero and 71 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Q.2 Write a shell script to display sum of digits of given number.
Chandra J.
Akash M.
Write pseudo code that will calculate running SUM; A user will enter numbers that will be added to the sum and when negative number is encountered, stop adding numbers and write Out the final result:
Nick C.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD