Learn to use arrays! Learn to use loops! Let the computer do the work for you and save yourself a ton of typing. Haven't tested it but the following code is probably equivalent, is certainly more compact, and would be easier to maintain going forward.
#define PINCOUNT 6
const int pins[] = {7,8,9,10,11,12};
void setup () {
for(int i=0;i<PINCOUNT;i++)
{
pinMode( pins[i], OUTPUT);
}
}
void loop ()
{
for(int i=0;i<PINCOUNT;i++)
{
digitalWrite(pins[i], HIGH);
if( (i-1>0) )
{
digitalWrite(pins[i-1], LOW);
}
else
{
digitalWrite(pins[PINCOUNT-1], LOW);
}
delay(500);
}
}
Good first effort though, you're on the right track!
PS: There's a # sign button in the toolbar. Click it and then paste inside the tags it makes for you.