Write a Fortran program that creates an integer array with values -123, -4, 5, 67, 890,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Fortran program that creates an integer array with values -123, -4, 5, 67, 890, and 12345. Prints out the array in several formatted ways. a. Print each element, on its own line, using a field that is 3 wide. b. Print each element, on its own line, using a field that is 4 wide. c. Print each element, on its own line, using a field that is 5 wide. d. e. Print each element, on its own line, using a field that is only as wide as needed. Print all six elements on one line, giving each a field that is 8 wide, using the repeat operator in your format statement. Be sure to understand why each number printed the way it did. Write a Fortran program that creates an integer array with values -123, -4, 5, 67, 890, and 12345. Prints out the array in several formatted ways. a. Print each element, on its own line, using a field that is 3 wide. b. Print each element, on its own line, using a field that is 4 wide. c. Print each element, on its own line, using a field that is 5 wide. d. e. Print each element, on its own line, using a field that is only as wide as needed. Print all six elements on one line, giving each a field that is 8 wide, using the repeat operator in your format statement. Be sure to understand why each number printed the way it did.
Expert Answer:
Answer rating: 100% (QA)
Here is the code for you Script to create an array with values 123 4 5 67 890 and 12345 array 123 4 5 67 890 12345 a Print each element on its own lin... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
15 digit calculator Standard integers are only 32 bits (4 bytes) in size which means they can only safely take values that are a maximum of 8 digits long. You must write a C++ program that is capable...
-
You are designing a new syntax for a programming language like Java, with the intention of making it more approachable to students by using English words instead of punctuation symbols. (a) How does...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
What is wrong with the following code fragment? int[] a; for (int i = 0; i < 10; i++) a[i] = i * i;
-
1. What lump sum do parents need to deposit in an account earning 10%, compounded monthly, so that it will grow to $80,000 for their son's college fund in 18 years? 2. What lump sum should be...
-
Compute the 2015 standard deduction for the following taxpayers. a. Margie is 15 and claimed as a dependent by her parents. She reports $800 in dividends income and $1,400 in wages from a part-time...
-
Ringo Company had $900,000 of sales in each of three consecutive years 2004-2006, and it pur chased merchandise costing $500,000 in each of those years. It also maintained a $200,000 inventory from...
-
The data shown in Table 3E.2 are chemical process yield readings on successive days (read down, then across). Construct a histogram for these data. Comment on the shape of the histogram. Does it...
-
ert the following degree measure to radians -90 = radians (Simplify your answer. Type an exact answer, using x
-
Does 1,4- dibromo cyclopentene shows cis and trans isomers? If yes, show its cis and trans isomers.
-
When do you assess the quality of perishable stock on hand, such as chicken thighs and lettuce mix? Explain why you have chosen this timeframe.
-
How share buy-backs differ from dividends: You purchased 2,500 shares of DotCom.com several years ago for $40 per share. The company is offering a buy-back for $54 per share. What is the amount of...
-
You will draft a motion to dismiss the complaint filed against Derek under FRCP 12(b)(2) based on a lack of personal jurisdiction. You will also draft a memorandum of law/points and authorities in...
-
In your career, you have worked with various clients including large corporations, and private citizens and have also taken on more pro bono cases than you have commercial ones. In practice, you are...
-
A kiln is heated to a temperature of 1030C and then allowed to cool. The temperature of the kiln, 0C, after t hours from when the kiln is allowed to cool is given by the formula 0 = 1030ekt where k...
-
Let h be the function given by h(x) = x^5 + x - 2/x^2 - 1. What is the domain of h? Explain why lim_x rightarrow 1 x^5 + x - 2/x^2 - 1 results in an indeterminate form. Next we will investigate the...
-
On March 31, 2018, Gardner Corporation received authorization to issue $30,000 of 9 percent, 30-year bonds payable. The bonds pay interest on March 31 and September 30. The entire issue was dated...
-
Create the following matrix A. By writing one command and using the colon to address range of elements (do not type individual elements explicitly), use the matrix A to: (a) Create a six-element row...
-
The product of two consecutive integers is 6,972. Using MATLAB's built-in function for operations with polynomials, determine the two integers.
-
Consider the ellipse x2/192 + y2/52 = 1. Determine the sides a and b of the rectangle with the largest area that can be enclosed by the ellipse.
-
Describe the characteristics required for revenue management to be of significant value.
-
Explain revenue management drivers in relation to Kimes and Chases four quadrants model.
-
Within an environment with which you are familiar (hospitality, tourism or events) analyse how revenue management could be applied.
Study smarter with the SolutionInn App