Question: Write a Fortran program that declares two integer arrays of length 3. The program should then prompt the user for 3 integer values and stores

Write a Fortran program that declares two integer arrays of length 3. The program should then prompt the user for 3 integer values and stores them in one of the arrays. Use a loop to fill a second array with the values from the first array in reverse order. Print the second array. Write a Fortran program that defines two one-dimensional arrays, each with 20 real elements. Use the array constructor notation we discussed in lecture to initialize the values of the first array to the following values (you may cut and paste these to save some typing): 0.1557 -0.4643 0.3491 0.4340 0.1787 0.2577 0.2431 -0.1078 0.1555 -0.3288 0.2060 -0.4682 -0.2231 -0.4538 -0.4029 0.3235 0.1948 -0.1829 0.4502 -0.4656 Make sure that no line in your program is longer than 80 characters. Remember that the ampersand character & allows you to continue a line. Initialize the second array with zeros. Then, fill the second array with the sum of all of the values in the first array up to that point. In other words, the value in the first element of the second array will be 0.1557, the value of the second element of the second array will be 0.1557 + -0.4643 = -0.3086. Write a Fortran program that takes the first one-dimensional array from problem 2 and uses reshape to store the values in a 4 times 5 array. Use a loop to print the array one row at a time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
