Created
March 9, 2010 22:56
-
-
Save natebenes/327254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM example3 | |
IMPLICIT NONE | |
INTEGER::in1, in2, sum, diff | |
110 FORMAT('Enter two three-digit integers') | |
WRITE(*,100) | |
WRITE(*,110) | |
READ(*,250) in1,in2 | |
250 FORMAT(2I3) | |
diff = in1 - in2 | |
sum = in1 + in2 | |
WRITE(*,*) ' ' | |
200 FORMAT(2X, I3, 8X, I3) ! num, | |
201 FORMAT('+', X, I3, 6X, '-', X, I3) | |
202 FORMAT('_____', 6X, '_____') | |
203 FORMAT(X, I4, 7X, I4) | |
WRITE(*,200) in1, in1 | |
WRITE(*,201) in2, in2 | |
WRITE(*,202) | |
WRITE(*,203) sum, diff | |
END PROGRAM example3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment