Need help with stopping or resetting a loop.

I want to stop the loop when "(numStart == numEnd)" but I don't how to.

Here is the code:

int numStart = 0;
int numEnd = 10;

void setup() {
Serial.begin(9600);
}

void loop() {
int Start;
if (numStart != numEnd) {
numStart++;
delay(1000);
}
else if (numStart == numEnd); {
//What do i put here to stop the loop or reset it
}
Serial.print(numStart);
delay(1000);
}

EDIT: I don't need help anymore, thanks.

Loop cannot be stopped per se. It is automatically restarted by the Arduino Environment. If you want something to only execute once, put it in the Setup.

That being said, you could lock the Arduino with while(true);

That program doesn't do much. What are you tring to do?

JaBa:
That program doesn't do much. What are you tring to do?

I'm trying to make a simple function that counts from 1-10 and either stops at 10 or starts over from 1

If you are trying to make a simple function then don’t use the built in Loop function.

Personally, I would use the Standard for/next Loop…

for(int i = numStart; i < numEnd; i++)
{ delay(1000);
}

Sticking with your code, to “restart” simply set numStart = 0;