Adam Mulan wrote in post #1011434:
> Hello again,
> I tried to find it in this book but I failed. But later found it in doc
> Kernel#printf is similar to C printf. This is not homework, but part of
> my script (I prepare histogram and learn Perl-like system scripting),
> however, you are right I should have googled it more widely.

No problem. The C program you gave doesn't do anything useful - the 
values of 'str' and 'num' don't change in the loop - so it looked like 
an odd thing to want to translate into Ruby.

If you'd asked "how do I make a loop which runs 10 times?" or "how do I 
insert the value of a variable into a string?" I'd have been more 
inclined to give a straightforward answer.

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