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 HW04_01
implicit none
integer, dimension(4) :: array_01 =[/-2, 0, 2, 4/]
integer, dimension(4) :: array_02, array_03, array_04
integer:: i

print*, "part a"
print*, "(4I3)" , array_01

do i=1,4
array_02(i)=2*(i-2)
end do
print *, "part b"

print 200, array_02
200 format (4I3)

print *, "Enter 4 digit values "
read (*,*), array_03(1), array_03(2), array_03(3), array_03(4)
print *, "part c"
print"(4I3)", array_03

do i=1,4
array_04(i)=array_01(4-i+1)
end do
print *, "part d"
print "(4I3)", array_04
end program HW04_01

Advertisements
Loading...

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