I've been trying to create a simple program that computes for the area of a circle which formula is "A=Pi*r*r" but C outputs the answer with only whole numbers... I tried limiting the value of my float to 3 by "%.3f" but it outputs (eg. 300.000) still no fractional part...
How do i output numbers with fractional value in Turbo C?
What do think the ".000" part is? That *is* the fractional part.
Reply:i remember of a keyword which would let you get the fractional par i think its %26lt;double%26gt;.
gerbera
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment