i have a question regarding to convert from fortran language to C++ programming especially in diognal array

for example;

DO 10 I=1,3*(X+2)
10 ID(I)=(I-1)*m+1

how do i convert into C++ programming

please someone help me