Ruby Examples

This commit is contained in:
2026-01-15 14:01:21 +09:00
commit cf3d7d3296
76 changed files with 1191 additions and 0 deletions

11
level1/04.rb Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
숫자를 입력받아 짝수/홀수 판별
=end
print "숫자 : "
number = gets.chomp.to_i
puts number.even? ? "짝수" : "홀수"