Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

Abinoam Jr. wrote in post #1125746:
> # Fix the 'max=10' to fit what you need as maximun iterations count.>> def lukas_loop(num1, num2)> max = 10 # I didn't understand how you calculated the max> iteractions counting.> 1.upto(max) do |n|> op = ((num1 % (10**(n+1))) / 10**n )> result = op*num2> puts "#{result}"> end> end>>> Is it something like this?
Ok you guys get the idea, but i need it to output every single time it
does the loop will the example you gave do that ?
Also i will be calculating the amount it loops by the .length of "num1"
so that it cycles through each of the digits and then multiplies each of
the digits by num2
Thanks a lot
-lukas
Edit: I tried your method but it doesn't seem to work, it doesnt output
anything