Question: A . Write a Fortran program to output values of the function s i n ( x ) to an array with 2 0 elements,

A. Write a Fortran program to output values of the function sin(x) to an array with 20
elements, where x varies from 0 to 6 along the range of the array. That is: array element
1 has the numerical value of sin(0) and array element 20 has the numerical value of sin
(6). Attach a screenshot of the code and the results from running the code.
B. Modify the program to take the array it calculated (call it a(i)) and perform the following
operation. Create a new array b(i) that, when compared to the original array.
a. Has the same array of values for elements 1 and 20.
b. For all the other elements, average the array elements with two adjacent array
elements, so that b(i)=a(i-1)+a(i)+a(i+1)3.
Attach a screenshot of the code and the results from running the code.
A . Write a Fortran program to output values of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!