PROGRAM chequerboard IMPLICIT NONE CHARACTER (LEN = 1) , DIMENSION (8,8) :: chboard INTEGER :: i, j ! Version 1: 4 statements: WRITE(*,'('' Version 1 - 4 statements: ''//)') chboard (1:8:2,::2) = 'B' chboard (2:8:2,::2) = 'W' chboard (1:8:2,2::2) = 'W' chboard (2:8:2,2::2) = 'B' WRITE(*,'(8A4)') chboard READ (*,*) ! Version 2: 3 statements: WRITE(*,'(//'' Version 2 - 3 statements: ''//)') chboard = 'B' WHERE (MOD(RESHAPE( (/ ((I+J,I=1,8),J=1,8) /) ,(/8,8/)),2) == 1) chboard = 'W' END WHERE WRITE(*,'(8A4)') chboard READ (*,*) STOP END PROGRAM chequerboard