Instead of putting all your variables into the scope of your function only, why don't you put them in main() and use them as arguments to your functions?
i.e.
1 2 3 4 5
int main()
{
double price;
do_something_to_argument(price);
}
Then you have all your variables in one place and you can use them as arguments to your function "calculations" and make it nice and easy.