1 Answer
0
You can simply use % operator....
e.g.
puts "#{9 % 2}"
Output:
1
10th Apr 2020, 6:48 AM
DeWill

Often have questions like this?
Learn more efficiently, for free:
Hot today
Cybersecurity techies
5 Votes
App Development
0 Votes
What's wrong in my code?
2 Votes
Please answer.
0 Votes
What's wrong with code?
0 Votes
Introduction of html
0 Votes
CSS or Tailwind
1 Votes
How do I use loop in pythan
0 Votes