	SUBROUTINE STDV(A,ST)
        DIMENSION A(500)
	LOGICAL*1 Y(3)
	REWIND 1
C	THE FOLLOWING STATEMENTS COMPUTE THE MEAN, NUMBER OF DATA 
C	POINTS, AND STANDARD DEVIATION WITH N-1 WEIGHTING.
	S=0
	N=0
4	N=N+1
	READ(1,5,END=10)A(N)
5	FORMAT(1X,F10.4)
	S=S+A(N)
	GO TO 4	
10	N=N-1
	FM=S/N
	AS=0
	DO 20 J=1,N
	AS=AS+((FM-A(J))**2)
20	CONTINUE
	FN=N-1
	ST=SQRT(AS/FN)
	WRITE(5,30)ST
30	FORMAT(1X,' THE STANDARD DEVIATION=',F10.4)
35	WRITE(5,40)
40	FORMAT(1X,' DO YOU WANT A HARD COPY OF THE STANDARD DEVIATION'/
     C' YES/N0  '$)
	READ(5,45)(Y(J),J=1,3)
45	FORMAT(3A1)
50	IF(Y(1).EQ.'Y') GO TO 60
	IF(Y(1).EQ.'N') GO TO 70
	WRITE(5,55)
55	FORMAT(1X,' ERROR. TRY AGAIN.')
	GO TO 35
60	WRITE(6,65)ST
65	FORMAT(1X,' THE STANDARD DEVIATION=',F10.4)
70	RETURN
	END
