Write a program in FORTRAN.f90 consisting of the main program and a subroutine. In particular, prepare...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program in FORTRAN.f90 consisting of the main program and a subroutine. In particular, prepare a function that calculates: f(x)= = x²+2, yax≥2 x+4,ɩax <2 The main program will read from the times.txt file 2 real numbers x and x0 and calculate the arithmetic expression: f(z)-f(20) using the previously prepared function. The results shall be printed on the screen to 3 decimal places in tabular form with headings x, xo, y and appropriate alignment to make them legible. times.txt 123456CORDE 2.1 4.6 1.2 3.4 3.5 2.1 4.8 3.1 -1.4 1.2 7 -4.5 -10.0 8 11 9 2.0 1.0 10 1.9 1.8 11 6.2 1.2 12 8.3 5.4 **read from line 4 Write a program in FORTRAN.f90 consisting of the main program and a subroutine. In particular, prepare a function that calculates: f(x)= = x²+2, yax≥2 x+4,ɩax <2 The main program will read from the times.txt file 2 real numbers x and x0 and calculate the arithmetic expression: f(z)-f(20) using the previously prepared function. The results shall be printed on the screen to 3 decimal places in tabular form with headings x, xo, y and appropriate alignment to make them legible. times.txt 123456CORDE 2.1 4.6 1.2 3.4 3.5 2.1 4.8 3.1 -1.4 1.2 7 -4.5 -10.0 8 11 9 2.0 1.0 10 1.9 1.8 11 6.2 1.2 12 8.3 5.4 **read from line 4 Write a program in FORTRAN.f90 consisting of the main program and a subroutine. In particular, prepare a function that calculates: f(x)= = x²+2, yax≥2 x+4,ɩax <2 The main program will read from the times.txt file 2 real numbers x and x0 and calculate the arithmetic expression: f(z)-f(20) using the previously prepared function. The results shall be printed on the screen to 3 decimal places in tabular form with headings x, xo, y and appropriate alignment to make them legible. times.txt 123456CORDE 2.1 4.6 1.2 3.4 3.5 2.1 4.8 3.1 -1.4 1.2 7 -4.5 -10.0 8 11 9 2.0 1.0 10 1.9 1.8 11 6.2 1.2 12 8.3 5.4 **read from line 4 Write a program in FORTRAN.f90 consisting of the main program and a subroutine. In particular, prepare a function that calculates: f(x)= = x²+2, yax≥2 x+4,ɩax <2 The main program will read from the times.txt file 2 real numbers x and x0 and calculate the arithmetic expression: f(z)-f(20) using the previously prepared function. The results shall be printed on the screen to 3 decimal places in tabular form with headings x, xo, y and appropriate alignment to make them legible. times.txt 123456CORDE 2.1 4.6 1.2 3.4 3.5 2.1 4.8 3.1 -1.4 1.2 7 -4.5 -10.0 8 11 9 2.0 1.0 10 1.9 1.8 11 6.2 1.2 12 8.3 5.4 **read from line 4
Expert Answer:
Answer rating: 100% (QA)
Heres a simple FORTRAN program that accomplishes the described task Please note that the code assumes that the data in the timestxt file is in the spe... View the full answer
Related Book For
Elementary Principles of Chemical Processes
ISBN: 978-0471720638
3rd Edition
Authors: Richard M. Felder, Ronald W. Rousseau
Posted Date:
Students also viewed these programming questions
-
Write a program in C that will display an integer multiplication table. It will take two inputs from the user the X and Y which is the number of rows and columns for the table. For example, if the...
-
A 20.O-kg projectile is fired at an angle of 60.0 above the horizontal with a speed of 80.0 m/s. At the highest point of its trajectory, Ibe projectile explodes into two fragments with equal mass,...
-
What is the standard free-energy change Go at 25oC for the following reaction? See Table 18.2 for data. H2(g) + S(rhombic) H2S(g) Calculate the value of the thermodynamic equilibrium constant K.
-
Develop the appropriate primary research question to be associated with this design. Develop a hypothetical research scenario that would necessitate the use of the Action Research Approach and a...
-
All That Blooms provides environmentally friendly lawn services for homeowners. Its operating costs are as follows. Depreciation ......... $1,400 per month Advertising ........ $200 per month...
-
Explore the procedure for ethical decision-making in the face of conflicting obligations, as described in Chapter 2. List the various conflicting obligations that Goldman Sachs executives might have...
-
At the beginning of the year, Anna began a calendar-year business and placed in service the following assets during the year: Date Acquired 1/30 Cost Asset Basis $ 58,000 $ 62,000 $ 105,000 $ 440,000...
-
8.32. In Fig. 8.6(a) if ; + 0, show that after the collision v= v; U2; and Vy Uzs = Vi- %3D %3D 8.33. A neutron of mass m, moving with velocity v collides with an atomic nucleus of mass in kinetic...
-
What does Model Rule 1.8 prohibit lawyers from doing in connection with litigation and their clients?
-
how would you use/interpret the ROS and ROA ratios to analyze the company's financial statement in Albion inc?
-
What SEC issues related to accounting data and operations and remedial actions assigned and penalties are given to Ixis Victor Alston, CEO of Ixis. Provide sources an date.
-
How do you determine the market value of a publicly traded company? write a brief procedure.
-
Can you think of any specific components that are essential to include in budget analysis and financial planning?
-
Economists consider which of the following costs to be irrelevant to a short-run business decision? A) opportunity cost B) out-of-pocket cost C) historical cost D) replacement cost
-
The Zwatch Company manufactures trendy, high-quality moderately priced watches. As Zwatch's senior financial analyst, you are asked to recommend a method of inventory costing. The CFO will use your...
-
A stream of air (21 mole% O 2 , the rest N 2 ) flowing at a rate of 10.0 kg/h is mixed with a stream of CO 2 . The CO 2 enters the mixer at a rate of 20.0m 3 /h at 150C and 1.5 bar what is the mole...
-
In terms of Le Chateliers Principle, explain why steam reforming is done at low pressures while methanol synthesis is performed at moderate to high pressures. Explain why reforming is done at high...
-
A mixture of methane and air is capable of being ignited only if the mole percent of methane is between 5% and 15%. A mixture containing 9.0 mole% methane in air flowing at a rate of 700kg/h is to be...
-
The line depicting the risk and return of portfolio combinations of a risk-free asset and any risky asset is the: A. Security market line. B. Capital allocation line. C. Security characteristic line.
-
With respect to the capital market line, a portfolio on the CML with returns less than the returns on the market portfolio represents a(n): A. Lending portfolio. B. Borrowing portfolio. C....
-
The portfolio of a risk-free asset and a risky asset has a better riskreturn tradeoff than investing in only one asset type because the correlation between the risk-free asset and the risky asset is...
Study smarter with the SolutionInn App