#!/usr/bin/env ruby # -*- coding: utf-8 -*- def nibai(x) x*2 end puts "数値を入れてください。2倍します。" y=gets.to_i printf("%d\n",nibai(y)