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.
program ex20
integer::a,b,c,d
read*,a,b
print *, 'a=',a
print *,'b=',b
if (a<b) then
c=2*a*b
print *, '2*product =',c
else
d=2*(a+b)
print *,'2 sum =',d
end if
end program ex20
program ex18b
!mathematical operation
real:: x,y
read*,x
if (x<3)then
y=6*x**2+1
print *, 'the value of y is=' ,y
else
y=-5*x
print*, 'the value of y is=',y
end if
end program ex18b
program ex20
integer ::a,b,c,d
read*,a,b
print*,"a=",a,"b=",b
if (a<b)then
c=2*a*b
print *,"2*product=",c
else
d=2*(a+b)
print *, "2 sum =",d
end if
end program ex20
program prob5
! print all numbers from LOW to HIGH by steps of STEPS
integer ::i,low,high,step
read *,low,high,step
do i=low,high,step
print *,i
end do
end program prob5