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
Python stressed me out
1 Votes
Course Doubt
1 Votes
Lesson Takeaways
0 Votes
Data analysis
0 Votes
Saved code
0 Votes
How do i make a lexer and parser
1 Votes