#!/usr/bin/env ruby # -*- coding: utf-8 -*- deh hanbun(x) x/2 puts "数値を入れてください。半分の値にします。" y = gets.to_i printf("%.1f\n", hanbun(y))