[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Can anyone try to solve this problems?

Brad Ediger

1/15/2007 7:07:00 AM

On Jan 15, 2007, at 1:02 AM, Cyrus Gabilla wrote:
>
> I am trying to solve these three problems in Ruby. I do not know if
> my solutions are really correct. I just wanted to ask help, if
> somebody can show their solutions. I would appreciated your help.
>
> 1. Write a one-line in irb using Range#inject to calculate 20!.
> Generalize this into a function.
> 2. Write a function to find the longest string in an array of
> strings.
> 3. Write an iterator function n_times(n) that calls the given block
> n times.

Please don't post your homework problems on this list. If you are
having trouble with a particular part of this, we'd be happy to help.

Brad