Have a look at my blog, its focus is mostly on advanced actions and variables. There is a list also with old articles, principles still valid.
http://blog.lilybiri.com/articles-on-advanced-actions
http://blog.lilybiri.com/curious-about-variables-in-captivate-4-5 some system variables have changed in 6-7: http://blog.lilybiri.com/system-variables-in-captivate-6
http://blog.lilybiri.com/unleash-the-power-of-variables-in-captivate-5
You can use Text Entry Boxes to have the user enter values for the variables. If you want to restrict the answers to only numbers, that is possible in 6-7. For other versions or more control you'll need a widget from Jim Leichliter. The command you'll have to use in the advanced actions will certainly be Expression.
Lilybiri