{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

final_F07_key - 7 10 5 2 9 3 Problem 3 RANGE(N1,N2 =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Architecture 1. FORTRAN 2. Unix 3. g77 4. RAM: Read / Write memory, High Speed, Volatile Memory. ROM: Read only memory, Low Speed, Non Voliate Memory. Cache: Specialized memory used by the CPU to speed up access to the RAM. 5. RAM 6. Secure shell is a network protocol that allows data to be exchanged over a secure channel between two computers. 7. First generation; vacuum tubes were used. UNIX - list all files begins with "list" in the current working directory - list all files ends with "list" in the current working directory - sort "biglist" and output into the file "slist" Problem 1 1. ALPHA needs to be defined as a 1D array. 2. - N needs to be defined as a parameter before setting the dimensions of A. - The second DO-loop is missing the upper limit. 3. OK 4. OK 5. OK Problem 2 1.) 4. 5. 2. 2.) 1. 4. 2. 3.) 2. 7. 4. 4.) 2.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 7. 10. 5.) 2. 9. 3. Problem 3 RANGE(N1,N2) = MAX(N1,N2)-MIN(N1,N2) Problem 4 SUBROUTINE FOUR(N,A,B,SUM,DIFF,DOTP) INTEGER N REAL A(N),B(N),SUM(N),DIFF(N),DOTP DOTP=0. DO 10 i=1,N SUM(i)=A(i)+B(i) DIFF(i)=A(i)-B(i) DOTP=DOTP+A(i)*B(i) 10 CONTINUE RETURN END Problem 5 PROGRAM DABDUB INTEGER A,B,C DO I=100,999 A=I/100 B=MOD(I,100)/10 C=MOD(I,10) IF ((A+B+C) .EQ. (A*B*C)) PRINT*, I ENDDO END Problem 6 PROGRAM Euler INTEGER E(1:8,0:7),M,N E(1,0)=1 E(2,0)=1 E(2,1)=1 DO 10 N=3,8 DO 20 M=0,N-1 IF (M .EQ. 0 .OR. M .EQ. N-1) THEN E(N,M)=1 ELSE E(N,M)=(N-M)*E(N-1,M-1)+(M+1)*E(N-1,M) ENDIF 20 CONTINUE 10 CONTINUE DO N=1,8 PRINT30, (E(N,M),M=0,N-1) ENDDO 30 FORMAT(8I6) END Problem 7 SUBROUTINE MAT(N,A) INTEGER N,A(N,N) DO I=2,N DO J=1,N IF (j .LT. i .OR. j .GT. (A-i+1)) A(i,j)=0 ENDDO ENDDO RETURN END...
View Full Document

{[ snackBarMessage ]}