Cash-back offer from May 2nd to 7th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 20.00

TEST BANK FOR Numerical Methods for Engineers By Steven C. Chapra

Question posted by
Online Tutor Profile
request

2.1
IF x < 10 THEN
IF x < 5 THEN
x = 5
ELSE
PRINT x
END IF
ELSE
DO
IF x < 50 EXIT
x = x - 5
END DO
END IF
2.2
Step 1: Start
Step 2: Initialize sum and count to zero
Step 3: Examine top card.
Step 4: If it says “end of data” proceed to step 9; otherwise, proceed to next step.
Step 5: Add value from top card to sum.
Step 6: Increase count by 1.
Step 7: Discard top card
Step 8: Return to Step 3.
Step 9: Is the count greater than zero?
If yes, proceed to step 10.
If no, proceed to step 11.
Step 10: Calculate average = sum/count
Step 11: End
2.3
start
sum = 0
count = 0
INPUT
value
value =
“end of data”
sum = sum + value
count = count + 1
T
F
count > 0
average = sum/count
end
T
F
2.4
Students could implement the subprogram in any number of languages. The following
Fortran 90 program is one example. It should be noted that the availability of complex
variables in Fortran 90, would allow this subroutine to be made even more concise.
However, we did not exploit this feature, in order to make the code more compatible with
Visual BASIC, MATLAB, etc.
PROGRAM Rootfind
IMPLICIT NONE
INTEGER::ier
REAL::a, b, c, r1, i1, r2, i2
DATA a,b,c/1.,5.,2./
CALL Roots(a, b, c, ier, r1, i1, r2, i2)
IF (ier .EQ. 0) THEN
PRINT *, r1,i1," i"
PRINT *, r2,i2," i"
ELSE
PRINT *, "No roots"
END IF
END
SUBROUTINE Roots(a, b, c, ier, r1, i1, r2, i2)
IMPLICIT NONE
INTEGER::ier
REAL::a, b, c, d, r1, i1, r2, i2
r1=0.
r2=0.
i1=0.
i2=0.
IF (a .EQ. 0.) THEN
IF (b <> 0) THEN
r1 = -c/b
ELSE
ier = 1
END IF
ELSE
d = b**2 - 4.*a*c
IF (d >= 0) THEN
r1 = (-b + SQRT(d))/(2*a)
r2 = (-b - SQRT(d))/(2*a)
ELSE
r1 = -b/(2*a)
r2 = r1
i1 = SQRT(ABS(d))/(2*a)
i2 = -i1
END IF
END IF
END
The answers for the 3 test cases are: (a) -0.438, -4.56; (b) 0.5; (c) -1.25 + 2.33i; -1.25 -
2.33i.
Several features of this subroutine bear mention:
· The subroutine does not involve input or output. Rather, information is passed in and out
via the arguments. This is often the preferred style, because the I/O is left to the
discretion of the programmer within the calling program.
· Note that an error code is passed (IER = 1) for the case where no roots are possible.
2.5 The development of the algorithm hinges on recognizing that the series approximation of the
sine can be represented concisely by the

Available Answer
$ 20.00

[Solved] TEST BANK FOR Numerical Methods for Engineers By Steven C. Chapra

  • This solution is not purchased yet.
  • Submitted On 15 Nov, 2021 08:32:15
Answer posted by
Online Tutor Profile
solution
2.1 IF x < 10 THEN IF x < 5 THEN x = 5 ELSE PRINT x END IF ELSE DO IF x < 50 EXIT x = x - 5 END DO END IF 2.2 Step 1: Start Step 2: Initialize sum and count to zero Step 3: Examine top card. Step 4: If it says “end of data” proceed to step 9; otherwise, proceed to next step. Step 5: Add value from top card to sum. Step 6: Increase count by 1. Step 7: Discard top card Step 8: Return to Step 3. Step 9: Is the count greater than zero? If yes, proceed to step 10. If no, proceed to step 11. Step 10: Calculate average = sum/count Step 11: End 2.3 start sum = 0...
Buy now to view the complete solution
Other Similar Questions
User Profile
NUMBE...

Health and Health Care Delivery in Canada 2nd Edition Test Bank

Chapter 1: The History of Health Care in Canada MULTIPLE CHOICE 1. When and where was Canada’s first medical school established? a. Saskatoon, in 1868 b. Ottawa, in 1867 c. Montreal, in 1825 d. Kingston, in 1855 ANS: C...
User Profile
Acade...

ATI Pharmacology Proctored Exam Test Bank

ATI Pharmacology Proctored Exam Test Bank ATI Pharmacology Proctored Exam Test Bank ATI Pharmacology Proctored Exam Test Bank...
User Profile
Slyve...

Medical Surgical Nursing 2nd Edition Hoffman Test Bank

Medical Surgical Nursing 2nd Edition Hoffman Test Bank 1. The medical-surgical nurse identifies a clinical practice issue and wants to determine if there is sufficient evidence to support a change in practice. Which type o...
User Image
HESIS...

COMPLETE HESI Exit Exam Test Bank, All Versions Covered 100%GRADED A+ WIT

1.Following discharge teaching a male client with dual ULCER tellsthe nurse the he will drink plenty of dairy products, such as milk, to help coat and protect his ulcer. What is the best follow-up action by the nurse? A....
User Profile
Captu...

Med Surg ATI Proctored Exam Test Bank 2023 With NGN

Med Surg ATI Proctored Exam Test Bank 2023 With NGN 1. A nurse is providing discharge teaching to a client who has a new prescription for sublingual nitroglycerin. Which of the following client statements indicates an unde...

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35