switch (company)
{
case'1':
sale=Calculate(quantity,aCountTotal,2.89);
break;
case'2':
sale=Calculate(quantity,bCountTotal,4.50);
break;
case'3':
sale=Calculate(quantity,cCountTotal,9.98);
break;
case'4':
sale=Calculate(quantity,dCountTotal,4.49);
break;
case'5':
sale=Calculate(quantity,eCountTotal,6.87);
break;
default:
cout<<"Incorrect Product Number entered."
<<"Enter a new Number." <<endl;
break;
}
remove the (' ') symbols infront of the numbers
Also your while loop will run forever because you are not getting more input from the user after your first check. You should include the std::cin/std::cout in your while loop or even better use getline and stringstring stream to get input to avoid running into messy input from user.
Or another way will be to use the condition of company not equal to zero and call your function again...sort of recursive (I like it :D)
Did you use an array or vector container to store things in? That way you won't need all those variables - what if some one asked to do the same thing but with 1000 products - are you going to have 2000 variables?
Would be good to see your new code - just because it works, doesn't mean that it's right.
Rather than using magic numbers like 2.89 & 4.50 etc, store these in a const array. You can look them up when you use a for loop.