#!?/usr/bin/env ruby
# -*- coding: utf -*-

puts"残金何円"
za = gets.chomp.to_i


okane = 0
while true
  puts"増えた額は(終わる時はv)"
  gaku = gets.chomp

if gaku == "v"
  break
end

 okane += gaku.to_i
 printf"小計%d円\n",okane
end

 za += okane.to_i
 printf("goukei%denn,okane")
end
