# How to increase 2 at 2 from 0 to 99

Hi, i am making a project about scoreboard for basketball, then I’m using three buttons and decoders and two display. I have achieved increasing an decreasing one point using the buttons but I have a problem with the button that increases two, when i have a number that ends at nine the display in the right must change to 1 and the left display must inscrease 1, on the other hand is the event when i have an eight on the right display if i push button to increase two the right display must change to 0 and the left increase in 1; the problem i have is that even i have an eight it increases but the right display does no change to zero but to 1; making the same process for when i have a nine , can someone please help how to increase 2 at 2 from 0 to 99… thanks

const int botonIncremento = 53;
const int botonIncremento2 = 50;
//const int botonIncremento3 = 51;
const int botonDecremento = 52;
const int deco_entradas2[4] = {38, 39, 40, 41};
int tiempoBotonIncremento = 0;

void setup()
{
pinMode(53, INPUT);
pinMode(50, INPUT);
pinMode(51, INPUT);
for(int a = 0; a < 4; a++){

for(int b = 0; b < 4; b++){

** }**

void loop()
** {**
** {**
** delay(200);**

** {**
** {**
** }**
** }**
** }**
** }**

** {**
** delay(200);**

** {**
** }**
** {**
** }**
** }**

** //Decremento**
** {**
** delay(200);**

// **
// {
// **
// }

** {

** }**

** {**
** }**

** {**
** }**

** {**
** }**

** }**
** }**

** {**
** case 0:**
** digitalWrite(26, LOW);**
** digitalWrite(27, LOW);**
** digitalWrite(28, LOW);**
** digitalWrite(29, LOW);**
** break;**

** case 1:**
** digitalWrite(26, LOW);**
** digitalWrite(27, LOW);**
** digitalWrite(28, LOW);**
** digitalWrite(29, HIGH);**
** break;**

** case 2:**
** digitalWrite(26, LOW);**
** digitalWrite(27, LOW);**
** digitalWrite(28, HIGH);**
** digitalWrite(29, LOW);**
** break;**

** case 3:**
** digitalWrite(26, LOW);**
** digitalWrite(27, LOW);**
** digitalWrite(28, HIGH);**
** digitalWrite(29, HIGH);**
** break;**

** case 4:**
** digitalWrite(26, LOW);**
** digitalWrite(27, HIGH);**
** digitalWrite(28, LOW);**
** digitalWrite(29, LOW);**
** break;**

** case 5:**
** digitalWrite(26, LOW);**
** digitalWrite(27, HIGH);**
** digitalWrite(28, LOW);**
** digitalWrite(29, HIGH);**
** break;**

** case 6:**
** digitalWrite(26, LOW);**
** digitalWrite(27, HIGH);**
** digitalWrite(28, HIGH);**
** digitalWrite(29, LOW);**
** break;**

** case 7:**
** digitalWrite(26, LOW);**
** digitalWrite(27, HIGH);**
** digitalWrite(28, HIGH);**
** digitalWrite(29, HIGH);**
** break;**

** case 8:**
** digitalWrite(26, HIGH);**
** digitalWrite(27, LOW);**
** digitalWrite(28, LOW);**
** digitalWrite(29, LOW);**
** break;**

** case 9:**
** digitalWrite(26, HIGH);**
** digitalWrite(27, LOW);**
** digitalWrite(28, LOW);**
** digitalWrite(29, HIGH);**
** break;**
** }**

** {**
** case 0:**
** digitalWrite(38, LOW);**
** digitalWrite(39, LOW);**
** digitalWrite(40, LOW);**
** digitalWrite(41, LOW);**
** break;**

** case 1:**
** digitalWrite(38, LOW);**
** digitalWrite(39, LOW);**
** digitalWrite(40, LOW);**
** digitalWrite(41, HIGH);**
** break;**

** case 2:**
** digitalWrite(38, LOW);**
** digitalWrite(39, LOW);**
** digitalWrite(40, HIGH);**
** digitalWrite(41, LOW);**
** break;**

** case 3:**
** digitalWrite(38, LOW);**
** digitalWrite(39, LOW);**
** digitalWrite(40, HIGH);**
** digitalWrite(41, HIGH);**
** break;**

** case 4:**
** digitalWrite(38, LOW);**
** digitalWrite(39, HIGH);**
** digitalWrite(40, LOW);**
** digitalWrite(41, LOW);**
** break;**

** case 5:**
** digitalWrite(38, LOW);**
** digitalWrite(39, HIGH);**
** digitalWrite(40, LOW);**
** digitalWrite(41, HIGH);**
** break;**

** case 6:**
** digitalWrite(38, LOW);**
** digitalWrite(39, HIGH);**
** digitalWrite(40, HIGH);**
** digitalWrite(41, LOW);**
** break;**

** case 7:**
** digitalWrite(38, LOW);**
** digitalWrite(39, HIGH);**
** digitalWrite(40, HIGH);**
** digitalWrite(41, HIGH);**
** break;**

** case 8:**
** digitalWrite(38, HIGH);**
** digitalWrite(39, LOW);**
** digitalWrite(40, LOW);**
** digitalWrite(41, LOW);**
** break;**

** case 9:**
** digitalWrite(38, HIGH);**
** digitalWrite(39, LOW);**
** digitalWrite(40, LOW);**
** digitalWrite(41, HIGH);**
** break;**
** }**
** }**

``````    estadoBotonIncremento2 = digitalRead(botonIncremento2);