DEV Community

loading...

Discussion on: Daily Challenge #249 - Incremental Changes

Collapse
daviducolo profile image
Davide Santangelo

in ruby

def alg(number, iteration, step)
  number + (iteration * step)
end
alg(100, 5, 50)
=> 350
alg(14, 20, 4)
=> 94