Hi sir Martin(aka Marrtin DeMello [mailto:martindemello@yahoo.com]):
You answered:
Sorry - I was careless and didn’t test the code…
[snip]
You could make the whole thing a method of TestCase:
class TestCase
attr_accessor :numdef initialize
@num =
enddef input_nums
print "How many numbers to input? "
n = gets.chomp.to_i
0.upto(n-1) do |i|
print "Please enter number #{i+1}: "
num[i] = gets.chomp.to_f
end
end
endob = TestClass.new
^^^^^^^^^^^^ <-TestCase
You erred
'm just playing(nitpicking) though
ob.input_nums
martin
kind regards,
-botp