Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help with following Fortran Program: Please help with following Fortran P

ID: 643335 • Letter: P

Question

Please help with following Fortran Program:

Please help with following Fortran Program: Problem 1: Create a file called base2.txt with the logs base 2 for numbers between 10,000 and 25,120. Write these numbers to the file base2.txt. Use 5 decimals. Design a fortran program to read the numbers stored in base2.txt and publish them to a 3D array with dimensions: 8rows x 7columns x 270depth containing all 15,120 numbers. Once finished loading the array, publish to the screen the first two 8x7 data rectangles (that is the first 8x7 frame of 56 numbers, and the second 8x7 frame that is another 56 numbers, displayed for depths = 1 & 2 respectively).

Explanation / Answer

#include

int arr[8][7][270];

double val,lg2;

        { for(i=0;i<270;i++)

   {

    for(j=0;j<7;j++)

    {

        for(k=0;k<8;k++)

        {

        arr[i][j][k]=val;

        }

   }

   

   }

for(i=0;i<2;i++)

   {

    for(j=0;j<7;j++)

    {

        for(k=0;k<8;k++)

        {

        printf("%ld ",arr[i][j][k]);

        } printf(" ");

   } printf(" ");

   

   }