diff --git a/a.rb b/a.rb deleted file mode 100755 index 05632da..0000000 --- a/a.rb +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env ruby -# -*- coding: utf-8 -*- - -while true diff --git a/ti-mu.rb b/ti-mu.rb index dd307f6..2cd3862 100755 --- a/ti-mu.rb +++ b/ti-mu.rb @@ -7,7 +7,7 @@ 2:問題 3:終わる" -sansu = gets.to_i +sansu=gets.to_i if sansu == 1 puts"どの公式を見る?" @@ -19,15 +19,16 @@ puts"どの図形の公式を知りたい?" i = gets.to_i printf("この図形の公式は%sだよ!\n",kousiki[i]) + sleep(3) redo elsif sansu== 2 puts"問題!" - mondai = ["一辺が6cmの正方形の面積は?","縦が4cm、横が9cmの長方形の面積は?","底辺が9cm、高さが4cmの平行四辺形の面積は?","8","4","6","",""] + mondai = ["一辺が6cmの正方形の面積は?","縦が4cm、横が9cmの長方形の面積は?","底辺が9cm、高さが4cmの平行四辺形の面積は?","あ","い","う","え","お"] l = rand(mondai,8) printf("%s\n",mondai[l]) - ll = gets.to_i + ll=gets.to_i if ll == 36 puts"正解!!" end