4. Develop a shell script to add two integer numbers and show the result by Considering...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
4. Develop a shell script to add two integer numbers and show the result by Considering the following steps: a) Prompt the user to enter 2 integer numbers between the range of 10 and 20 (inclusive) b) If the numbers are not in the range it will keep asking "Numbers should be in the range of 10 to 20! Try again:" until a valid rang of numbers are entered. c) Then the valid 2 integer numbers will be added and it will print "The sum of num1 and num2 is sum" (replace num1, num2 and sum as the value of the variables) d) Your should check your program with the following sample inputs: Enter 2 numbers in the range of 10 to 20:5 19 Number should be in the range of 10 to 20! Try again: 3 12 Number should be in the range of 10 to 20! Try again: 12 9 Number should be in the range of 10 to 20! Try again: 7 12 Number should be in the range of 10 to 20! Try again: 12 15 The sum of 12 and 15 is: 27 4. Develop a shell script to add two integer numbers and show the result by Considering the following steps: a) Prompt the user to enter 2 integer numbers between the range of 10 and 20 (inclusive) b) If the numbers are not in the range it will keep asking "Numbers should be in the range of 10 to 20! Try again:" until a valid rang of numbers are entered. c) Then the valid 2 integer numbers will be added and it will print "The sum of num1 and num2 is sum" (replace num1, num2 and sum as the value of the variables) d) Your should check your program with the following sample inputs: Enter 2 numbers in the range of 10 to 20:5 19 Number should be in the range of 10 to 20! Try again: 3 12 Number should be in the range of 10 to 20! Try again: 12 9 Number should be in the range of 10 to 20! Try again: 7 12 Number should be in the range of 10 to 20! Try again: 12 15 The sum of 12 and 15 is: 27
Expert Answer:
Answer rating: 100% (QA)
The question youve presented is asking for the creation of a shell script that accomplishes the foll... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Let (x) = x 2 + 3x + 2 and g(x) = x + 1. Find each of the following. (a) (fg)(x) (b) (fg) (-2) (c) (+)(x) (d) ()(-2)
-
Many political observers have noted that Republican presidential candidates tend to emphasize their conservative positions on policy issues while running for their party's nomination, and Democratic...
-
On December 31, 2015, the following data were accumulated to assist the accountant in preparing the adjusting entries for Oceanside Realty: a. The supplies account balance on December 31 is $6,100....
-
A construction engineer has to inspect 5 construction sites in a 2-day inspection schedule. He may or may not be able to visit these sites in two days. He will not visit any site more than once. (a)...
-
Lowen Corporation grants stock options to its managerial employees on December 31 of each year. Employees may acquire one share of common stock with each stock option. Lowen sets the exercise price...
-
a) Figure la shows an overall two-port network consisting of Network A and Network B in a certain interconnection. Network A and Network B are respectively a T-network and a -network as shown....
-
Pathfinder College is a small liberal arts college that wants to improve its admissions process. In particular, too many of its incoming freshmen have failed to graduate for a variety of reasons,...
-
Wale ling pt a he ooing ydrides . 1,5e and diVander Wals fo Cavalent bondi ly idi wing do l de lyd fenic bnde 4) Phenol Wer 14 ng e ng wich h ighst di CH, Aall, g fonding is pt in Naliyl id hydugin...
-
Background Pies"R"Us is a family run company located in Barrie, Ontario engaged in the manufacture and sale of various baked goods, primarily apple pies. The company has a modern 110,000 square foot...
-
2853292/fullscreen/58740780/View 12 (2) - + 90% Problem Statement This case involves King Companies, Inc. which has been discussed in previous chapters. At the company, segregation of duties is poor...
-
Explain the process of preparing a bank reconciliation statement and its importance in financial accounting. How do discrepancies between the cash book and bank statement get resolved?
-
Item # Shelf Price Price at the Register 1 $ 30.60 $ 30.60 2 $ 26.90 $ 26.90 3 $ 21.60 $ 21.60 4 $ 43.60 $ 43.60 5 $ 25.99 $ 25.99 6 $ 3.60 $ 3.60 7 $ 7.50 $ 7.50 8 $ 10.25 $ 10.25 9 $ 24.50 $ 24.50...
-
Obtain each of your company's annual reports for the 2021, 2020, and 2019 financial years from the company's website or www.asx.com.au. The annual reports contain the chairperson's report, directors'...
-
Bolding Inc.'s contribution margin ratio is 61% and its fixed monthly expenses are $42,000. Assuming that the fixed monthly expenses do not change, what is the best estimate of the company's net...
-
Find the equations of the ellipses satisfying the given conditions. The center of each is at the origin. Passes through (2, 2) and (1, 4)
-
Sally and Charles Heck received the following dividends and interest during 2012: Assuming the Hecks file a joint tax return, complete Schedule B of Form 1040 (on page 2-33) for them for the 2012 tax...
-
Leslie and Leon Lazo are married and file a joint return for 2012. Leslie's Social Security number is 466-47-3311 and Leon's is 467-74-4451. They live at 143 Snapdragon Drive, Reno, NV 82102. For...
-
Calculate the amount of the child and dependent care credit allowed for 2012 in each of the following cases, assuming the taxpayers had no income other than the stated amounts. a. William and Carla...
-
Define a closely held corporation.
-
Explain the role played by a board of directors of a corporation.
-
Explain the steps in forming a limited liability corporation.
Study smarter with the SolutionInn App