Sha256: 77ba640d7c74d852c7c660c398d9a3c424c827a24642888ab3ce2b3e125043f4

Contents?: true

Size: 473 Bytes

Versions: 10

Compression:

Stored size: 473 Bytes

Contents

In ANSI FORTRAN 77 or later:
 INTEGER A, B
 PRINT *, 'Type in two integer numbers separated by white space',
+         ' and press ENTER'
 READ *, A, B
 PRINT *, '   A + B = ', (A + B)
 PRINT *, '   A - B = ', (A - B)
 PRINT *, '   A * B = ', (A * B)
 PRINT *, '   A / B = ', (A / B)
 PRINT *, 'MOD(A,B) = ', MOD(A,B)
 PRINT *
 PRINT *, 'Even though you did not ask, ',
+         'exponentiation is an intrinsic op in Fortran, so...'
 PRINT *, '  A ** B = ', (A ** B)
 END

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/arithmetic.integer/fortran.txt
zettacode-0.1.6 files.zettacode/arithmetic.integer/fortran.txt
zettacode-0.1.6 files.zettacode2/arithmetic.integer/fortran.txt
zettacode-0.1.5 files.zettacode/arithmetic.integer/fortran.txt
zettacode-0.1.5 files.zettacode2/arithmetic.integer/fortran.txt
zettacode-0.1.4 files.zettacode/arithmetic.integer/fortran.txt
zettacode-0.1.4 files.zettacode2/arithmetic.integer/fortran.txt
zettacode-0.1.3 files.zettacode/arithmetic.integer/fortran.txt
zettacode-0.1.2 files.zettacode/arithmetic.integer/fortran.txt
zettacode-0.1.1 zettacode.files/arithmetic.integer/fortran.txt