Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Compile and Execute FORTRAN-95 Online

program mpadilla26HW04_02
implicit none
real, dimension(20):: array_a, array_b=0
integer::z
array_a= (/0.2481, 0.4133, 0.4961,&
0.4618, 0.3686, -0.0495, -0.3477, -0.4219, &
 -0.4954, -0.4156, -0.4162,&
 0.3258, -0.0574, 0.2749, -0.1003,&
 -0.2711, 0.0383, -0.3934, 0.3173, -0.2402/)
do z= 1,20
if (z==1) then
array_b(z)=array_a(z)
else
array_b(z)=array_a(z) + array_a(z-1)
end if
end do
do z= 1,4
print*, '(5F10.4)' , array_b((z-1)*5+1:z*5) !(1:5) (6:10)
end do
end program mpadilla26HW04_02

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.