const byte Seven_seg[7] = {0,1,2,3,4,5,6};

byte Count = 0;
const byte numbers[] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};
void setup() {
  for (int i = 0;i < 7;i++){
    pinMode(Seven_seg[i], OUTPUT);
  }
}

void loop() {
  displayDigit(Count);
  Count = (Count + 1)%10;
  delay(500);
}

void displayDigit(byte value){
  if(0 <= value && value < 10){
    value = numbers[Count];
    for (int i = 0;i < 8;i++){
      digitalWrite(Seven_seg[i],(value&1));
      value >>= 1;
    }
  }
}