You need to cast your variables to long doubles.
sum = (long double) c1 * (long double) c2 * (long double) c3 * (long double) c4 * (long double) c5;
or maybe just casting the first is good enough:
sum = (long double) c1 * c2 * c3 * c4 * c5;
I think you can use the <static cast> method, but I'm not sure of the syntax.