I need help guys please.I'm stack here

Hi @Jellie2625

in your first if statement you’ve got condition val >= 19

When val is 19, the condition is true, but it shouldn’t be.

With first if statement you are checking if the value is 19 or above (val >= 19), but it should be checking for 20 and above.

First if statement should be if( val >= 20 )

Your val goes above the limit you have.
You should change it to val >=20.
It’s important to detect those problems while you code so you can do it better.
There are some programs that can detect those kind of vulnerabilities among the code, I have a friend who a program called Checkmarx for that kind of services. You’re welcome to try it yourself.
Good luck.
Michael.

Your first condition is incorrect. It should be val >= 20