cpp: #include <stdlib.h>  \n#include <stdio.h>\nint main(int argc, char* argv[])  \n{\n  int i;\n  int len=100;\n\n  int numNodes=len, numNodes2=0; \n  int x[100]; \n\n  // initialize x[]\n  for (i=0; i< len; i++)\n  {\n    if (i%2==0)\n      x[i]=5;\n    else\n      x[i]= -5;\n  }\n\n#pragma omp parallel for\n  for (i=numNodes-1 ; i>-1 ; --i) {\n    if (x[i]<=0) {\n      numNodes2-- ;\n    }\n  }\n  printf ("numNodes2 = %d\n", numNodes2);\n  return 0;\n} \n
fortran: program DRB011_minusminus_orig_yes\n    use omp_lib\n    implicit none\n\n    integer :: i, len, numNodes, numNodes2\n    integer :: x(100)\n    len = 100\n    numNodes=len\n    numNodes2=0\n\n    do i = 1, len\n        if (MOD(i,2) == 0) then\n            x(i) = 5\n        else\n            x(i) = -5\n        end if\n    end do\n\n    !$omp parallel do\n    do i = numNodes, 1, -1\n        if (x(i) <= 0) then\n            numNodes2 = numNodes2-1\n        end if\n    end do\n    !$omp end parallel do\n\n    print*,"numNodes2 =", numNodes2\nend program