/*
    B00111111, B00000110, B01011011, B01001111, B01100110,
     B01101101, B01111101, B00000111, B01111111, B01101111
  */int i=0; int j=0; int b=9;
int binary_number_desplay[] = {
    B00111111, B00000110, B01011011,
    B01001111, B01100110, B01101101,
    B01111101, B00000111, B01111111, B01101111};
void setup()
{
  DDRD |= 0xFF;
  DDRB |= 0xFF;
}
void loop()
{

while(i<=9){
  PORTB = 0b00100000;
    PORTD = binary_number_desplay[i];
    delay(200); i++;
}
  
  for (int j = 1; j <= 9; j++)
  {
    for (int i = 0; i <= 9; i++)
    {
      PORTB = 0b00011111;
      PORTD = binary_number_desplay[j];
      delay(300);
    PORTB = 0b00101111;
      PORTD = binary_number_desplay[i];
      delay(300);
    }}

     for (int j = 9; j >=1; j--)
  {
    for (int i = 9; i >=0; i--)
    {
      PORTB = 0b00011111;
      PORTD = binary_number_desplay[j];
      delay(300);
    PORTB = 0b00101111;
      PORTD = binary_number_desplay[i];
      delay(300);
    }}
    
    
    
    
    
    
    
    
    
    
    
    
    }