1 program p1b 2 implicit none 3 real(8) a = 1d0, b 4 do 5 6 7 8 9 10 11 a=a/2 b=a+1d0 if (b1d0) cycle a=2*a exit end do print '(4X, A, ES23.16e3)', 'a = ', a 12 end program p1b

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.4: A Case Study: Rectangular To Polar Coordinate Conversion
Problem 9E: (Numerical) Write a program that tests the effectiveness of the rand() library function. Start by...
icon
Related questions
Question
100%

What does this program compute?
What is the value of a at the end of the program?
Would you change anything in this program? Why/how, or why not?

1 program p1b
2
implicit none
3
real(8)
a = 1d0, b
4
do
5
6
7
8
9
10
11
a=a/2
b=a+1d0
if (b1d0) cycle
a=2*a
exit
end do
print '(4X, A, ES23.16e3)', 'a = ', a
12 end program p1b
Transcribed Image Text:1 program p1b 2 implicit none 3 real(8) a = 1d0, b 4 do 5 6 7 8 9 10 11 a=a/2 b=a+1d0 if (b1d0) cycle a=2*a exit end do print '(4X, A, ES23.16e3)', 'a = ', a 12 end program p1b
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr