REAL X, Z, T
INTEGER I, J, K, Y
X = 4. ** (3 / 2)
Y = 1 / 2 * 7 / 2
Z = SQRT (X ** 2 + Y ** 2)
I = (-4) ** (-3)
T = X ** Y ** Z
J = MOD (INT (X), INT (T))
K = IABS (I) + EXP (FLOAT (I))
PRINT *, J, X, Y, Z, I, T
END
INTEGER A,B
DO 22 A = 17,28,4
DO 33 B = 1,3
IF (MOD(A,B).GT.B / 3) THEN
IF (A / 6.GE.B) THEN
PRINT *,'HEGEL'
ELSE
PRINT *,'NIETZSCHE'
ENDIF
ELSE
PRINT *,'SPINOZA'
ENDIF
33 CONTINUE
22 CONTINUE
STOP
END
INTEGER A(20,20) READ *, N DO 20 I = 1,N READ 10,( A(I,J), J = 1,N) 10 FORMAT(4I4) 20 CONTINUE DO 50 I = 1,N IP = I + 1 DO 50 J = IP,N IW = A(I,J) A(I,J) = A(J,I) 50 A(J,I) = IW DO 60 I = 1, N 60 PRINT *, (A(I,J), J = 1, N) END / DATA 4 4 1 2 5 2 3 4 8 5 6 7 10 1 3 4 5
REAL, I, IM
READ 5 IM, W, T,
5 FORMAT (I3, 2F10.0)
DO 20 J = 1,6
IF (MOD(J,2) EQ 0) THEN
I = IM * COSWT + J
20 CONTINUE
ENDIF
PRINT8, IM, W, T, I
END
Write an FORTRAN 77 main program that reads data into a square array, uses the sub-program - TSTMAT, and then prints out the matrix and whether it meets the requirement stated above.
Your program should have a title at the top of a new page. Show the operating system job control lines to run the program. Write your program in the space below and on the reverse of the exam pages as required.
Don't forget good internal program documentation!
COLUMNS FIELD EXAMPLE
1-7 McGill ID 8154321
10-30 Last, First names SMITH, JEAN
31-60 10 Assignment marks 10 12 15 .....
61-65 Mid Term mark (out of 100) 85
66-70 Final exam mark (out of 100) 78
Using this set of data write a FORTRAN program to perform the
following operations.