Discussion:
A5P2
(too old to reply)
ragulan.r
2010-10-13 00:27:47 UTC
Permalink
I need some clarification on certain things in the problem
1) If the array is empty do I output nothing?
2) If the coefficient is large do I have to change the output in
anyway (e.g full number or scientific notation)
David Xingliang Lou (CS 137 Tutor)
2010-10-13 16:26:18 UTC
Permalink
Post by ragulan.r
I need some clarification on certain things in the problem
1) If the array is empty do I output nothing?
2) If the coefficient is large do I have to change the output in
anyway (e.g full number or scientific notation)
If the array has size zero, output 0.

Use printf("%g") to format your coefficients. %g will automatically pick
between the full number and scientific notation, depending on how large
the exponent is.

Loading...