Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Unix: Copy the filesfrom~cs252/Assignments/sqrt/into your newly created directory. (Do not copy thesqrtdirectory itself.) Compile the code, capturing the error messages by any of the

In Unix:

Copy the filesfrom~cs252/Assignments/sqrt/into your newly created directory. (Do not copy thesqrtdirectory itself.)

Compile the code, capturing the error messages by any of the techniques covered in this module's lesson.

Fix any errors that you encounter. Continue compiling and fixing until you are able to produce an executable program namedcomputeSqrt.

  • Each error can be fixed by a change of no more than 2 characters on a a single line each. If you find yourself doing anything more complicated,stop! (You may well be giving incorrect compilation commands.)

This program computes square roots of positive numbers. It expects to receive a floating point number as a command line parameter when run, e.g.,

Test the program on a few numbers to be sure it works.

Make a shell script namedsqrts.shthat will take a list of numbers as command line parameters and will runcomputeSqrton each of them in turn, however many there are.

For example, the output of

should be

2.5 5 10
./sqrts.sh 6.25 25 100 
./computeSqrt 6.25 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions