#!/usr/local/bin/ruby x = gets.chomp.to_i if x > 0 printf("%d は正の数ね\n", x) end