Media Summary: Quick demo of why you should always initialize variables. By the way, if you want an actual random number, check out RAND: ... program swapmain implicit none real :: a, b ! Read in two values read(*,*) a, b call swap(a,b) write(*,*) a,b contains subroutine ... program different data types character name*20 integer roll real avgmarks Write(*,*)'Enter the name :' read(*,*)name write(* ...
Fortran Programming Tutorial 3 5 - Detailed Analysis & Overview
Quick demo of why you should always initialize variables. By the way, if you want an actual random number, check out RAND: ... program swapmain implicit none real :: a, b ! Read in two values read(*,*) a, b call swap(a,b) write(*,*) a,b contains subroutine ... program different data types character name*20 integer roll real avgmarks Write(*,*)'Enter the name :' read(*,*)name write(* ...