not bad for the first try, check the following points:
for (iLoop=0; iLoop<=50; iLoop=iLoop+=10)
I assume you wanted to write iLoop = iLoop + 10 then you might have found the more compact way iLoop += 10. In this context it causes only redundancy and no harm, but does not look nice
The following is however surely will not work:
do while (nMotorEncoder[motorA]<=iLoop)
{
motor[motorA] = 75;
motor[motorC] = -75;
bRead = true;
}
there are two types of conditional loops. the first one is the
while( condition ) { core of the loop }
the other one is
do { core of the loop } while ( condition );
your code is the second form without any action within the loop core.
the RobotC will infinitely repeat the do while(...) loop since the motor is not working.
May I propose an alternative architecture:
start the motor (e.g. motor[ motorA ] = required power)
make a loop that waits for the motor encoder to reach the target
stop the motor by setting motor[ motorA ] = 0
also, if you are a beginner, it helps a lot if you have a piece of paper with columns for the variables and try to play the role of the computer.