Add 0-99 counter buttons help

I designed the 0-FF counter but now I need to cancel this automatic counting and increase it with a button instead of it I programmed the program with 7 digital outputs to check the displays and check the cathodes of the digital input displays in the button and I count the counter from 0 to FF, I can not find my attachment, can I help?

//global değişkenler
const int a = 2;
const int b = 3;
const int c = 4;
const int d = 5;
const int e = 6;
const int f = 7;
const int g = 8;
const int dp = 9;
const int konlar = 10;
const int kbirler = 11;
const int but = 12;
int sayici;

void setup() {
for (int i = 2; i < 16; i++)
{ //delay(100);
pinMode(i, OUTPUT);
}
pinMode(but, INPUT_PULLUP);
sayici = 0;
}

void loop() {
int birler = sayici % 16;
int onlar = sayici / 16;
int i = 0;
while (i < 35)
{
goster(birler);
digitalWrite(kbirler, HIGH);
digitalWrite(konlar, LOW);
delay(10);
goster(onlar);
digitalWrite(kbirler, LOW);
digitalWrite(konlar, HIGH);
delay(10);
i++;
}
sayici++;

if (sayici == 255)
sayici = 0;

}
void goster(int n)
{
switch (n)

{
case 0:
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, LOW);
break;
case 1:
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, LOW);
digitalWrite(g, LOW);
break;
case 2:
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, LOW);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
break;
case 3:
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
break;
case 4:
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 5:
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 6:
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 7:
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, LOW);
digitalWrite(f, LOW);
digitalWrite(g, LOW);
break;
case 8:
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 9:
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, LOW);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 10: //A için
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, LOW);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 11: //b için
digitalWrite(a, LOW);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 12: //c için
digitalWrite(a, LOW);
digitalWrite(b, LOW);
digitalWrite(c, LOW);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH) ;
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
break;
case 13: //d için
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, LOW);
digitalWrite(g, HIGH);
break;
case 14: //e için
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, LOW);
digitalWrite(d, HIGH);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;
case 15: //F için
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, LOW);
digitalWrite(d, LOW);
digitalWrite(e, HIGH);
digitalWrite(f, HIGH);
digitalWrite(g, HIGH);
break;

}

}

Don't start a new post - please ask moderator to merge threads

Hello, necoli35. Welcome to the Arduino forum.

When posting code, please remember to use code tags. If you don't know what code tags are, please look here: How to use this forum - please read. - Installation & Troubleshooting - Arduino Forum and read number 7.

I noticed this in your loop:

  sayici++;

That will make the counter go up, always.
But, you do not always want the counter to go up. You want it to depend on the button.
I noticed that you are using INPUT_PULLUP. Here is what I read about INPUT_PULLUP:

When connecting a sensor to a pin configured with INPUT_PULLUP, the other end should be connected to ground. In the case of a simple switch, this causes the pin to read HIGH when the switch is open, and LOW when the switch is pressed.

I got that information from here: https://www.arduino.cc/en/Tutorial/DigitalPins
So, we know that if the pin reads LOW, then the button is being pressed. Here is how we use that knowledge:

  if (digitalRead(but)==LOW) {
    sayici++;
  }

That way, the counter will go up when, and only when, you hold down the button.
Please try this and tell us what happens.