Michal M. wrote in post #1056320:
> roboter Y. wrote in post #1056317:
>> i want a ruby program, is have 2 Arguments(a,b) ,which output the Prime
>> zahlen between a and b. hier is my program. but it's wrong. i don't know
>> where is the problem. can anyone help me?
>
> Replace
>
>>             f =!f
>
> with
>
> f = false
>
>> p "the prime between #{a} and #{b} is #{sushu}."
>
> Also, the last line doesn't do anything meaningful, because you do not
> return the prime numbers, you print them.

i have try, but it's still wrong,
wenn ich :
ruby prime.rb 2 50
prime.rb:3:in `prime': bad value for range (ArgumentError)
  from prime.rb:15:in `<main>'

-- 
Posted via http://www.ruby-forum.com/.