program exampleSerial
implicit none
INTEGER :: loop1Indx, loop2Indx, loop3Indx
INTEGER :: loop1Limit, loop2Limit, loop3Limit
loop1Limit=3
loop2Limit=3
loop3Limit=4
do loop1Indx = 1, loop1Limit
do loop2Indx = 1, loop2Limit
do loop3Indx = 1, loop3Limit
write(*,*) loop3Indx+(loop2Indx-1)*loop3Limit+(loop1Indx-1)*loop2Limit*loop3Limit
enddo
enddo
enddo
end program