How to define multiple if conditions?

Hi guys!

How to say:

"if the length of an int more than 2 and the last digit is 5"

Thanks a lot!
Last edited on
Supposing that int is positive:
 
if((x > 99) && ((x % 10) == 5))
Assuming you're talking about the base 10 representation of a value held by an int:

if ( (value/100) && (value%10 == 5) )
Last edited on
Ok guys, length is the number of digits, ain't it?

Edit: Yes, I tried and it Works perfrect! thanks
Last edited on
Topic archived. No new replies allowed.