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

19

program 19
integer::a,b
read *, a,b
if (a>b) then
print *, a
else 
print *, b
end if 
end program 19

Compile and Execute FORTRAN-95 Online

program hello
   Print *, "Hello World!"
end program Hello

Compile and Execute FORTRAN-95 Online

program ex17
! this program calculates 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

Compile and Execute FORTRAN-95 Online

program ex15
! this program calculates MBs into bits
real::m,n
read*,m
n=m*2**23
print*,'m=',m
   Print *, "bits n=",n
end program ex15

Compile and Execute FORTRAN-95 Online

program ex12
! this program calculates determination
real::a,b,c,d
read*,a,b
c=a-b
d=a/b
print*,'a=',a
print*,'b=',b
print*,'determination a-b=',c
   Print *, 'determination a/b=',d
end program ex12

Compile and Execute FORTRAN-95 Online

program ex11
! this program calculates length of thrid side of triangle
real::a,b,c,p
read*,a,b,p
c=p-(a+b)
print*,'a=',a
print*,'b=',b
print*,'p=',p
   Print *, "length of third side of tringle=",c
end program ex11

Compile and Execute FORTRAN-95 Online

program ex9
! this program calculates area of square
real::a,area
read*,a
area=a*a
print*,'a-',a
   Print *, "area od square=",area
end program ex9

Compile and Execute FORTRAN-95 Online

program ex7
! this program calculates the perimeter of rectangle
real::l,b,perimeter
read*,l,b
perimeter=2*(l+b)
print*,'l=',l
print*,'b=',b
   Print *, "perimeter of rectangle=",perimeter
end program ex7

Compile and Execute FORTRAN-95 Online

program ex3
! this program calculates the perimeter of triangle
real::a,b,c,perimeter
read*,a,b,c
perimeter=a+b+c
print*,'a=',a
print*,'b=',b
print*,'c=',c
   Print *,'total perimeter=',perimeter
end program ex3

Compile and Execute FORTRAN-95 Online

program ex2
! this program calculates arithmetic average of 5 numbers
real::a,b,c,d,e,mean
read*,a,b,c,d,e
mean=(a+b+c+d+e)/5
print*,'a=',a
print*,'b=',b
print*,'c=',c
print*,'d=',d
print*,'e=',e
Print*,'the total arithmetic mean=',mean
end program ex2

Previous 1 ... 4 5 6 7 8 9 10 ... 111 Next
Advertisements
Loading...

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