On Wed, 25 Apr 2007 20:44:52 +0900, Andrei Ursan wrote:

> I need that 'cause i want to use ruby for some algorithms, i don't want
> to write them in C i want them in ruby. So if i had that example i can
> do the rest myself.

Still, being polite does not hurt.
And not everyone does read C++ fluently.

As far as I can see, the code is
concerned with printing some stuff.
But I have evaded C++ for long
enough to not be sure about its intention.

What is it that you're trying to do?

We can show you how to do this in Ruby,
which might be surprisingly different from
a line-by-line translation of the code you posted.

s