how to add x value in y seconds

hi.im coding a game but i am having some trouble

float sure;
float deger;
void Update(){
sure = sure + 1 * Time.deltaTime;
        if (sure == 10f)
        {
            sure = 0;
            deger += 1;
        }
}

this is my code “sure” gains value every second but when it came to ten it doesnt be zero “deger” value cant grow how to solve this?

Instead of checking if (sure == 10F), check for if (sure >= 10F) and then reset your numbers as needed.

You generally don’t want to use == when you’re comparing floats, especially when you’re adding something like Time.deltaTime to a float – your number will virtually never equal exactly 10F.