#!/usr/local/bin/ruby STDERR.print "長方形の面積を求めます。\n" STDERR.print "底辺は?(cm): " width = gets.to_i STDERR.print "高さは?(cm): " height = gets.to_i printf("面積は%d平方cmです\n", width*height)