Write bash script called compute

Assignment Help Basic Computer Science
Reference no: EM133217728

Write a bash script called compute (no extension) that will calculate addition, subtraction, multiplication, and division of two numbers (real and integer). If both numbers are integers, return an integer result, if one of the values is a real, return real number with default precision (unless specified, see below). Note the order of arguments. Examples: compute 7 + 3 compute 9.37 / 7.21 compute 100 x 2.21 compute 2783.34 - 25 Allow also calculation of two functions, hypotenuse (see earlier handout) and area of circle (given radius). These calculations will always be real, even if input is integer. The -f option token is followed by option argument which specifies function is to be calculated. Arguments (values) are listed last. compute -f hyp 8.1 3.5 compute -f area 4.21 The precision (scale) can be specified as an option with a single option argument. Examples: compute -s 5 9.37 / 7.21 compute -s 9 -f hyp 8.1 3.5 compute -f hyp -s 3 8.1 3.5 Include all error checking and handling. Include all appropriate inline documentation. Provide user help how to use the utility either when the sequence, value, or number of arguments is incorrect, or when user : saks

Reference no: EM133217728

Questions Cloud

Driven development become popular with iterative development : Why has use-case-driven development become popular with iterative development?
Write a paper describing parenting styles : Write a paper describing parenting styles and the development of themes in family life. Address the following: Influence of siblings on family dynamics
Analyze several arguments about internet resources : Scenario - Your boss requests for you to analyze several arguments about Internet resources to check if they are valid or invalid
Equilibrium price for semiconductor chips : How have these changes in supply and demand affected the equilibrium price for semiconductor chips?
Write bash script called compute : Write a bash script called compute (no extension) that will calculate addition, subtraction, multiplication, and division of two numbers.
Write down an equation for the new budget line : Draw the initial budget line and the newer budget line? Also, write down an equation for the new budget line
Develop a feasibility study containing a swot : You need to develop a feasibility study containing a SWOT with at least three examples of Strength, Weakness, Opportunities and Threats
Cost and output determination : An employer owns a firm with a set wage for each employee, but she want to maximize her profit margins by terminating the employee who's marginal physical produ
Describe a process framework in your own words : Describe a process framework in your own words. When we say that framework activities are applicable to all projects

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determining the speed of a computer

Explain the role of each of the following in determining the speed of a computer: RAM, Clock speed and Data on hard disk

  Various financial risks at kilgore custom milling

special risk management issues with Blue Wood Chocolates and various financial risks at Kilgore Custom Milling.

  What are some examples of the three types of controls

What are some examples of the three types of controls and how they could be used to prevent (or slow down) attackers?

  Compare and contrast the dyb and gyb strategies

Write clearly and concisely about enterprise architecture topics using proper writing mechanics and technical style conventions.

  Draw an adjacency matrix for g

Suppose that in a group of 5 cities: A, B, C, D, and E, the following pairs of locations are connected with each other with direct flight.

  Baseline security requirements

What are baseline security requirements that should be applied to the design and implementation of applications, databases, systems,

  Write a function named sumofcubes

Write a function named sumOfCubes that takes a single integer parameter, n, and returns the number of triplets of positive perfect cubes whose sum

  ProQuest library database

Locate a dissertation on any topic by searching the ProQuest library database. Read the literature review section.

  Current values on foreign direct investments

1.) Discuss the two different methods the Bureau of Economic Analysis (BEA) uses to place current values on foreign direct investments.

  Result of the calculation to be truncated

Assuming that variables value1 and value2 are both declared as ints, which of the following statements causes the result of the calculation to be truncated?

  Describe each fact-finding technique and identify it

The five most commonly used fact-finding techniques are examining documentation, interviewing, observing the organization in operation, conducting secondary research, and using questionnaires. Describe each fact-finding technique and identify the ..

  How many different ways can the officers be appointed

UMUC Stat Club must appoint a president, a vice president, and a treasurer. There are 10 qualified candidates.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd