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

Maximum value of three numbers using Fortran

program j
!maximum value of three numbers
integer::a,b,c
read*,a,b,c
print*,'a=',a
print*,'b=',b
print*,'c=',c
print*,
if (a>b)then
if(a>c)then
max=a
else 
max=c
end if
end if
if(b>c)then 
max=b
else
max=c
end if
print*,'max value of 3 numbers is',max
end program j

Advertisements
Loading...

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