I have a question regarding to convert from fortran language to C++ programming. How I convert into C++ programming , Please someone help me!!!
Code:
```   DIMENSION TK(15), PK(15), TC(15),DT(15),DP(15),H(15),PAR(15),Q(15), M(15), PO(15), PO1(15), PO2(15), PI(15),
1 FORMAT (213)
5 FORMAT (2F8.4,I3)
3 FORMAT (3F10.4,I3)
15 FORMAT (///,8F10.5,/)
READ (5,1) NG, M1
25 FORMAT (F10.3)
98 READ (5,25) T
IF(T.EQ.0) GO TO 99
DO 100 I=1, NG
M(I)=M1+I-1
TK(I)=A*(8*M(I)+M2)**P+8
DT(I)=(M(I)-1)*0.02+DTF
TC(I)=TK(I)/(0.567+DT(I)-DT(I)**2)
DP(I)=(M(I)-1)*0.227+DPF
PK(I)=(14*M(I)+Z)/(DP(I)+0.34)**2
H(I)=(TK(I)/TC(I))*(ALOG10(PK(I))/(1-TK(I)/TC(I)))
PAR(I)=ALOG10(PK(I))+H(I)*(1-TC(I)/T)
PO2(I)=(14*M(I)+Z)/(82.06*TK(I))
PI(I)=5*(T/TC(I)-1)
PO1(I)=PO2(I)*10**PI(I)
PO3=1
PO(I)=PO1(I)+PO3*(1-T/TC(I))**0.3
100 Q(I)=10**PAR(I)
20 FORMAT (//,10F10.5,/)
WRITE(6,20) T
WRITE(6,15) (Q(I),I=1,NG)
WRITE(6,6) (PO(I),I=1,NG)
6 FORMAT (///,8F10.6,/)
GO TO 98
99 CONTINUE
STOP
END```

Last edited by shabbir; 7Mar2012 at 19:09.. Reason: Code blocks