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 15. 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)

In Exercises 14, determine whether the statement is true or false. Justify your answer. 1. When the graph of a rational function f has a vertical asymptote at x = 5, it is possible to sketch the...

Compare the following two constitutional isomers. The 13 C NMR spectrum of the first compound exhibits five signals, while the second compound exhibits six signals. Explain. .

Tandrin Aviation Holdings Ltd. agreed to sell a jet aircraft to Aero Toy Store, LLC, for \($31.75\) million. ATS paid a \($3\) million deposit to a third party with the balance due upon delivery....

The bank portion of the bank reconciliation for Langer Company at November 30, 2014, was as follows. The adjusted cash balance per bank agreed with the cash balance per books at November 30. The...

Question 1 Let X be a finite set of prizes and A(X) be the set of lotteries over those prizes. Show that, if a set of preferences > on A(X) has an expected utility representation, then it must be the...

The file taxdata contains information from federal tax returns filed in 2007 for all counties in the United States (3,142 counties in total). Create a PivotTable in Excel to answer the following...

Mr. Smith made 24 monthly deposits of $250 into an account that earns 8 % compounded quarterly. How much will be in the account three years after his last deposit?

Assume that $200 is deposited today, two years from now, four years from now, six years from now, and eight years from now in a savings account which earns 10% annual interest, what is the balance at...

What are the primary uses of buckwheat, canola, grain sorghum, and sunflower?

9. If during 2011 the money supply increases by 6%, the inflation rate is 5%, and the growth of real GDP is 3%, what must have happened to the value of velocity during 2011?

Comparative balance sheets for 2018 and 2017 and a statement of income for 2018 are given below for Metagrobolize Industries. Additional information from the accounting records of Metagrobolize also...

11) find the point of diminishing returns of the function 2x^3  1.5x^2 +3x

You have the opportunity to invest in an office building in downtown Tampa, in which you would purchase as a 5year holding investment with a 13% required rate of return (discount rate). The building...

Determine the center and radius of each circle. Sketch each circle. 4x 2 + 4y 2 9 = 16y

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 233) 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 466473311 and Leon's is 467744451. 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...

How is elasticity related to the revenue from a sales tax?

University of Richmond Professor Erik Craft analyzed the states pricing of vanity plates. He found that in California, where vanity plates cost an average of $28.75, the elasticity of demand was...

For each of the following goods, state whether it is a normal good, a luxury, a necessity, or an inferior good. Explain your answers. a. Vodka. d. Perfume. b. Table salt. e. Beer. c. Furniture. f....
Study smarter with the SolutionInn App