This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 1. PROGRAM HAND INTEGER A,B,C C Ask the user for the 3 input integers A,B,C PRINT*, 'Enter three integers' READ*, A,B,C C Determine is the inputs make up a pair, a trio, or empty hand IF (A .EQ. B .AND. B .EQ. C) THEN PRINT*, 'Trio.' ELSE IF (A .EQ. B .OR. B .EQ. C .OR. A .EQ. C) THEN PRINT*, 'Pair.' ELSE PRINT*, 'Empty Hand.' END IF END 2. PROGRAM LOOP REAL I DO 10 I = 200., 199., -0.1 PRINT*, 'Hello there', I 10 CONTINUE END 3. PROGRAM NOMOD INTEGER X LOGICAL DIV23 C Ask the user for the input integer PRINT*, 'Enter an integer' READ*, X C Determine if the input is divisible by 23 DIV23 = X/23 .EQ. FLOAT(x)/23. C Output the result PRINT*, 'The integer', X, 'is divisible by 23:', DIV23 END...
View Full Document
This note was uploaded on 08/31/2010 for the course ENGRMAE 10 taught by Professor Staff during the Spring '08 term at UC Irvine.
- Spring '08