n = 10 min = 99999; i = 1 while i <= n do a = rand( 100 ).to_i printf( "%d番目の乱数は%dです\n" , i , a ); if a < min then min =a; end i += 1 end printf( "-----------\n" ); printf( "最小値は%dです\n" , min );