part1b - array(i+1)=temp test=1 END IF END DO WRITE(*,*)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
PROGRAM part1b IMPLICIT NONE INTEGER:: array(10), i, temp, test=0, count=0 WRITE(*,*) "Enter the ten numbers in random order contained in the array:" READ(*,*) array !Store values DO count=count+1 DO i=1,9 IF(array(i)>array(i+1))THEN temp=array(i) array(i)=array(i+1)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: array(i+1)=temp test=1 END IF END DO WRITE(*,*) 'After cycle#',count,'The array is:',array IF(test==0)EXIT test=0 END DO WRITE(*,*) 'Your final organized array after',count,'cycles is:' WRITE(*,*) array END PROGRAM...
View Full Document

This note was uploaded on 07/22/2010 for the course MAE 112 taught by Professor Freeh during the Spring '10 term at North Country Community College.

Ask a homework question - tutors are online