First of all, this is not a "program", it's a Script.
Second of all, it's acceptable as a first script. But if you keep up with such code formatting (ugly as hell) it will not be acceptable and people here won't take it nicely.
I am sure Ruby, as every other language, has specific Ruby conventions, but general code conventions apply to every (real) coding language.
One of your mistakes are missplaced spaces,
bad indentation,
lack of spaces (b=Integer(gets.chomp) ;; d=a+b),
variable names ar horrible - use words instead of letters,
no grouping for logical statements (elsif c == 5)...
This is acceptable as a working (I assume it's working, can't run it) solution. Correct the errors I pointed out and you'll do much better.
Waiting for your other scripts