谁能帮帮把这程序改成JAVA
无耐对FORTTRAN一点不了解,谁能帮忙改成JAVA的,谢谢了。
PROGRAM LISTING
10 PRINT "LINEAR PROGRAMMING "
15 PRINT
19 REM-LINEAR PROGRAMMING ,SIMPLEX METHOD
20 DIM A(6,10), B(6)
30 PRINT
40 PRINT "TYPE '1 ' FOR MAXIMIZATION,OR '-1 ' FOR MINIMIZATION ";
50 INPUT Z
60 Z=-Z
70 PRINT "TYPE NUMBER OF INSTRAINTS,NUMBER OF VARIABLES ";
80 INPUT M,N
90 PRINT "NUMBER OF LESS THAN,EQUAL,GREATER CONSTAINTS“;
100 INPUT L,E,G
110 IF M=L+E+G THEN 140
120 PRINT ” DATA ON CONSTRAINTS INCONSISTENT,TAY AGAIN。“
130 GOTO 90
139 REM- THIS IS THE INITIALIZATION ROUTINE
140 C=N+M+G
150 C1=C+1
160 C2=N+L+G
170 M1=M+1
180 M2=M+2
190 PRINT
200 FOR I=1 TO M2
210 FOR J=1 TO C1
220 A(I,J)=0
230 NEXT J
240 NEXT I
250 FOR I=1 TO M
260 B(I)=0
270 NEXT I
280 FOR I=1 TO M
290 FOR J=1 TO N
300 READ A(I,J)
310 IF I <=L THEN 330
320 A(M1,J)=A(M1,J)-A(I,J)
330 NEXT J
340 IF I> L THEN 380
350 B(I)=N+I
360 A(I,N+1)=1
370 GOTO 440
380 B(I)=N+G+I
390 A(I,N+G+I)=1
400 IF I> L+E THEN 420
410 GOTO 440
420 A(I,N+I-E)=-1
430 A(M1,N+I-E)=1
440 NEXT I
450 FOR I= 1 TO M
460 READ A(I,C1)
470 NEXT I
480 FOR J=1 TO N
490 READ A(M2,J)
500 A(M2,J)=Z*A(M2,J)
510 NEXT J
520 PRINT
540 PRINT "YOUR VARIABLES 1 THROUGH "; N
550 IF L=0 THEN 570
560 PRINT "SLACK VARIABLES "; N+1 ; "THROUGH ";N+L
570 IF G=0 THEN 590;
580 PRINT "SURPLUS VARIABLES "; N+L+1; "THROUGH ";C
590 IF L=M THEN 780
600 PRINT "ARTIFICIAL VARIABLES ";C2+1; "THROUGH ";C
610 M3=M1
620 GOSUB 1040
630 PRINT
640 FOR I1=1 TO M
650 IF B(I1) <=C2 THEN 760
660 IF A(I1,C1) <=.00001 THEN 690
670 PRINT "THE PROBLEM HAS NO FEASIBLE SOLUTION "
680 GOTO 3060
690 FOR J1=1 TO C2
700 IF ABS(A(I1,J1)) <=.00001 THEN 750
710 R=I1
720 S=J1
730 GOSUB 1260
740 J1=C2
750 NEXT J1
760 NEXT I1
780 PRINT
790 M3=M2
800 GOSUB 1040