Quote Originally Posted by raven2313 View Post
Also, I have to show the solution in scientific notation which i figured out is %e, but say i use the values: a=10, b=15, and c=20, i get the right answer (1.60e-007) but is there a way to format that even further to eliminate the '0s' in the -007?
According to one source I found regarding the %e format specifier in printf:
The exponent always contains at least two digits; if the value is zero, the exponent is 00. In Windows, the exponent contains three digits by default, e.g. 1.5e002, but this can be altered by Microsoft-specific _set_output_format function.
Which seems to be echoed in another post here.

So, assuming you are indeed on a Windows system maybe you could use the suggestion. Otherwise it looks like you can't do it... except maybe by printing it to a string and then finding/deleting those extra 0's and then printing the modified string.