Segment_writeText(counter , 1000); // Display the content in counter array on
7segment
}
for (int i =99; i>0; i--){
// convert the value in the i variable (input) to a string(output) in base 10
intTostr(counter , i , DEC);
if( i < 10)
//execute this section of code if the value in the i variable is less than 10
{
counter[1]=counter[0]; // replace counter[1] with the content of the counter[0]
counter[0]='0'; // replace counter[0] variable with the character ‘0’
}
Segment_writeText(counter , 1000); // Display the content in counter array for 1
sec
}
}
}