0
want to check whether d operand is even number
a = 42 b = 8 c = 20 d = 4 if a > 7 && b < 11 && c == 20 && d???? puts "Statement is correct." end
1 Respuesta
+ 1
you can use the even? method:
'd.even?' returns true if d is even else false.
or the traditional way 'd%2==0' ,
d is even if remainder of its division by two is null.