Program formatmultdiv !------------------------------------------------------------------------------ !Program: Multiplication and Division Formatting !Author: Chris Harper !Date: 2/7/2008 !------------------------------------------------------------------------------ IMPLICIT NONE !declarations integer :: first, second, product, quotient, remainder !get input print *, "Enter an integer (3 digit max):" read "(I3)", first print *, "Enter another integer (3 digit max):" read "(I3)", second !calculate product and quotient product = first * second quotient = first / second remainder = mod(first, second) !output the results in classic formatted notation print "(/ T4, 3X, I3, T24, 6X, I3, 2X, 'R', 1X, I3)", first, quotient, remainder print "(T4, 'X', 2X, I3, T24, 5X, '----')", second print "(T4, '------', T24, I3, 1X, ')', I4)", second, first print "(T4, I6)", product end