#!/usr/koeki/bin/ruby # -*- coding: utf-8 -*- p=p0=250000 y=0 while p < 3*p0 p *= 1.03 printf("%3d年\t%d円\n", y+=1, p) end