Be sure you have read (or at least skimmed) chapters 4 and 5 of the textbook.
Do the following programming problems. You will end up with at least one code file per problem. Every code file should begin with comments identifying you as the author and describing its purpose. It should be readable to human readers as well as to the compiler, so use consistent indentation and meaningful variable names. Feel free to cut and paste code from any of the sample programs on the course Web site.
Submit your program source (and any other needed files) by sending mail to bmassing@cs.trinity.edu, with each file as an attachment. Please use a subject line that mentions the course number and the assignment (e.g., ``csci 1320 homework 3''). You can develop your programs on any system that provides the needed functionality, but I will test them on one of the department's Linux machines, so you should probably make sure they work in that environment before turning them in.
Your program should prompt the user for a taxable income (in whole dollars) and compute and print the tax due on that amount, based on the above formula, rounded to the nearest dollar (round 50 cents upward). For example, the tax on $7,925 is $782.50 plus 15% of $100; computing and rounding, this gives $798.
You could do the entire calculation using only integers, or you may prefer to do the calculation using floating-point numbers (preferably doubles) and convert the final result to an int.
As you may (or may not!) recall from math courses, this equation has real roots exactly when
in which case the two roots are given by
Your program should prompt the user for the three coefficients , , and (in the form of floating-point numbers). If the equation has real roots, the program should compute and print them; otherwise it should print a message such as ``No real roots''. (So for example, for , , and equal to 1, 0, and -1 respectively, it should print the two roots 1 and -1.)