Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,16 @@
subroutine sort(n, a)
implicit none
integer :: n, i, j
real :: a(n), x
do i = 2, n
x = a(i)
j = i - 1
do while (j >= 1)
if (a(j) <= x) exit
a(j + 1) = a(j)
j = j - 1
end do
a(j + 1) = x
end do
end subroutine

View file

@ -0,0 +1,15 @@
SUBROUTINE SORT(N,A)
IMPLICIT NONE
INTEGER N,I,J
DOUBLE PRECISION A(N),X
DO 30 I = 2,N
X = A(I)
J = I
10 J = J - 1
IF (J.EQ.0) GO TO 20
IF (A(J).LE.X) GO TO 20
A(J + 1) = A(J)
GO TO 10
20 A(J + 1) = X
30 CONTINUE
END