how to pass data across the different controllers

I have made three scaffold generated controllers in my project by
following three commands

ruby script/generate scaffold amain a:integer
ruby script/generate scaffold bmain b:integer
ruby script/generate scaffold cmain c:integer

I want to take three different inputs( a,b,c) on three different pages
and then on the third page once a user clicks the button "Calculate" a
value based on following equation has to be generated.

value = a + b*x1 + c*x2

x1 is set on the page where input "a" is set
and x2 is set on the page where input "b" is set

x1 and x2 are virtual attributes and hence do not exist in any of the
data models. Value of these coefficients is not constant and in fact
depends on several dynamic factor such as the date and time when a/b
was set.

I want to know how to pass on the values of "x1" and "x2" from one
controller to another. These attributes are not the part of model of
"a" or model of "b". I can not keep them in models.


you mean to say in view there should be some fields which will be set
in controller but will be invisible to the user.
Then in this case, will the values be accessed through param[] table.
Can you please give a small example or some pointer to study about
this topic. if possible