
int latchPin = 8;
int clockPin = 12;
int dataPin = 11;
int j[10] = {0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8, 0x80, 0x90};
int i[10] = {0,1,2,3,4,5,6,7,8,9} ;
int count = 0 ; // main count recorder
void setup() {
  // put your setup code here, to run once:
pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}

void loop() {
count = count + 1 ; 
int count_3 = count/1000 ; // display it 9

int count_3_r = count % 1000 ; //812
//int count_2 = count_3_r; 
int count_2 = count_3_r / 100 ; // display it 8
int count_2_r = count_3_r % 100; // 12
//int count_1 = count_2_r ;
int count_1 = count_2_r / 10 ; // 1 o/p 
int count_1_r = count_2_r % 10 ;// 2 o/p 




digitalWrite(clockPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, j[count_1_r]);
//delay(10);
digitalWrite(clockPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, j[count_1]);
//delay(10);
digitalWrite(clockPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, j[count_2]);
//delay(10);
digitalWrite(clockPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, j[count_3]);
//delay(10);
delay(1000);
}
