Bifalgorithm post · Computer science one · Function Pointers

Why might a program need generalized rounding beyond whole numbers?

Why might a program need generalized rounding beyond whole numbers? (Computer science one · Function Pointers) — "Recall that the standard math library provide…

Ideas in this flowchart

  • Rounding numbers with the standard math library
  • The standard math library provides a round() function.
  • The round() function rounds a number to the nearest whole number.
  • There is also a need to round numbers to cents.
  • A solution for rounding to cents is now introduced.
Feed/

Why might a program need generalized rounding beyond whole numbers?

No cover

Channel

Computer science one

1 page

"Recall that the standard math library provides a round() function that rounds a number to the nearest whole number. We’ve had need to round to cents as well. We now have"

Flowchart preview
👍
0
0 comments0 shares

Sign in to view and post comments.