Paste Search Dynamic
Recent pastes
bamboo0
  1. # your code goes here#!/usr/bin/env ruby
  2. #  -*- coding: uft-8 -*-
  3.  
  4. STDERR.print("見つけたときは?[m] (終了はq)n")
  5. bamboo0 =gets.chomp
  6.  
  7. if bamboo0 == "q"
  8.   exit 0
  9. elsif bamboo0.to_f>0
  10.   bamboo0 = bamboo0.to_f
  11.   print("OK進みますn")
  12. else
  13.   print("間違ったよn")
  14.   exit 1
  15. end
  16.  
  17. STDERR.print("ゴールは?[m]n")
  18. bamboo1 = gets.to_f
  19. wariai = 1.8
  20. printf("%d割増しでのびるよn",(wariai -1.0)*10)
  21. bamboo = bamboo0
  22.  
  23. d =0
  24.  
  25. while true
  26.   printf("%d週目だよ今%4.2f[m]n", d += 1, bamboo*= wariai)
  27.   if bamboo>bamboo1
  28.     break
  29.   end
  30. end
  31.  
  32. print ("おしまいn")
Parsed in 0.004 seconds