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 t22
! this program calculate the sum of numbers from low to high
integer::x,y,sum,i
read*,x,y
print*,"low number is",x
print*,"high number is",y
sum=0
do i=x,y
sum=sum+i
end do
print*,"the sum from low to high",sum
end program t22
program ex20
! this program is to calculate the doubled product of two numbers
integer::a,b,y
read*,a,b
if (a<b) then
y=2*a*b
else
y=2*(a+b)
end if
print*,y
end program ex20
program t24
! this program read 10 numbers
integer::m,n,i
m=0
n=1
do i=1,10
read*,a
m=m+a
n=n*a
end do
print*,'sum of 10 numbers is',m
print*,'product of 10 numbers is',n
end program t24
program ex17
! this program calculates the values of the variables
real::m,n,c
m=67
m=m+13
n=(m/4)+(m/2)
c=m*n
print*,'m=',m
print*,'n=',n
print*,'c=',c
end program ex17