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) :: array1 =(/-2, 0, 2, 4/)
integer, dimension(4) :: array2, array3, array4
integer:: i

print*, "Part a"
print*, "(4I3)" , array1

do i=1,4
array2(i)=2*(i-2)
end do
print *, "Part b"

print 200, array2
200 format (4I3)

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

do i=1,4
array4(i)=array1(4-i+1)
end do
print *, "Part d"
print "(4I3)", array4
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.