Chapter

Life & Taxes

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. How can conditionals validate logarithm inputs and handle errors?

    "The user could enter invalid values such as b = − 10 or x = − 2 . 54 (logarithms are undefined for non-positive values in any base). We want to ensure that b > 1 and x > 0. With conditionals, we can

  2. How can conditional statements be used to build a life and taxes program?

    "Let’s adapt the conditional statements we developed in Section 3.6.4 into a full C program. The first thing we need to do is establish the variables we’ll need and read them in from the user. At the

  3. How is the child tax credit calculated and limited by total tax liability?

    "Next we compute the child tax credit, taking care that it does not exceed $3,000. A conditional based on the number of children suffices as at this point in the program we already know it is zero or

Life & Taxes | ComputerScienceOne | Bifalgorithm | Bifalgorithm