Similar Books


    No books found

Title
Chapter: 2 / Q: 18
(Print a table) Write a program that displays the following table. Cast floatingpoint numbers into integers
Chapter: 2 / Q: 19
(Geometry: area of a triangle) Write a program that prompts the user to enter three points (x1, y1), (x2, y2), (x3, y3) of a triangle and displays its area. The formula for computing the area of a triangle is
Chapter: 2 / Q: 20
(Financial application: calculate interest) If you know the balance and the annual percentage interest rate, you can compute the interest on the next monthly payment using the following formula:
Chapter: 2 / Q: 21
(Financial application: calculate future investment value) Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula:
Chapter: 2 / Q: 22
(Financial application: monetary units) Rewrite Listing 2.10, ComputeChange .java, to fix the possible loss of accuracy when converting a double value to an int value
Chapter: 2 / Q: 23
(Cost of driving) Write a program that prompts the user to enter the distance to drive, the fuel efficiency of the car in miles per gallon, and the price per gallon, and displays the cost of the trip. Here is a sample run:
Chapter: 3 / Q: 1
(Algebra: solve quadratic equations) The two roots of a quadratic equation ax2 + bx + c = 0 can be obtained using the following formula:
Chapter: 3 / Q: 2
(Game: add three numbers) The program in Listing 3.1, AdditionQuiz.java, generates two integers and prompts the user to enter the sum of these two integers. Revise the program to generate three single-digit integers and prompt the user to enter the sum of these three integers
Chapter: 3 / Q: 3
(Algebra: solve 2 * 2 linear equations) A linear equation can be solved using Cramer’s rule given in Programming Exercise 1.13. Write a program that prompts the user to enter a, b, c, d, e, and f and displays the result. If ad - bc is 0, report that “The equation has no solution.”
Chapter: 3 / Q: 4
(Random month) Write a program that randomly generates an integer between 1 and 12 and displays the English month name January, February, …, December for the number 1, 2, …, 12, accordingly
total questions: 772

Questions

772

Views

A PHP Error was encountered

Severity: Warning

Message: Undefined property: stdClass::$TotalViews

Filename: books/book.php

Line Number: 411

Best Answers

299

Points

5