Absolute Java (6th Edition)
Absolute Java (6th Edition)
6th Edition
ISBN: 9780134041674
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 1, Problem 9PP

A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5 feet of height and 5 pounds for each additional inch. Write a program with a variable for the height of a person in feet and another variable for the additional inches. Assume the person is at least 5 feet tall. For example, a person that is 6 feet and 3 inches tall would be represented with a variable that stores the number 6 and another variable that stores the number 3. Based on these values, calculate and output the ideal body weight.

Blurred answer
Students have asked these similar questions
Write a program that reads the amount of a monthly mortgage payment andthe amount still owed—the outstanding balance—and then displays theamount of the payment that goes to interest and the amount that goes toprincipal (i.e., the amount that goes to reducing the debt). Assume that theannual interest rate is 7.49 percent. Use a named constant for the interest rate.Note that payments are made monthly, so the interest is only one twelfth ofthe annual interest of 7.49 percent.
Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies. Ex: If the input is: 0 (or less than 0), the output is: No change Ex: If the input is: 45 the output is: 1 Quarter 2 Dimes
Write a program with total change amount (in cents) as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies. Hint: Start from the largest denomination. Divide the change amount by the number of cents in the denomination to get the number of coins used. The remainder of the division is used to find the number of coins used in the next denomination. Ex: value // 100 gives the number of dollars used. The remainder is divided by 25 to find the number of quarters used. Ex: If the input is: 0 (or less than 0), the output is: No change Ex: If the input is: 45 the output is: 1 Quarter 2 Dimes

Chapter 1 Solutions

Absolute Java (6th Edition)

Ch. 1 - Can a Java program have two different variables...Ch. 1 - Give the declaration for two variables called feet...Ch. 1 - Give the declaration for two variables called...Ch. 1 - Prob. 14STECh. 1 - Prob. 15STECh. 1 - Prob. 16STECh. 1 - Convert each of the following mathematical...Ch. 1 - What is the output of the following program...Ch. 1 - What is the output produced by the following lines...Ch. 1 - Prob. 20STECh. 1 - Given the following fragment that purports to...Ch. 1 - What is the output produced by the following lines...Ch. 1 - What is the output produced by the following lines...Ch. 1 - What is the output produced by the following? Ch. 1 - What is the output produced by the following?...Ch. 1 - What is the output produced by the following?...Ch. 1 - What is the output produced by the following? Ch. 1 - Prob. 28STECh. 1 - Prob. 29STECh. 1 - What is the output of the following two lines of...Ch. 1 - Suppose sam is an object of a class named Person...Ch. 1 - The following code is supposed to output the...Ch. 1 - Prob. 33STECh. 1 - What is the output produced by the following Java...Ch. 1 - What is the normal spelling convention for named...Ch. 1 - Write a line of Java code that will give the name...Ch. 1 - Body Mass Index (BMI) helps in specifying the...Ch. 1 - The video game machines at your local arcade...Ch. 1 - Write a program that starts with the string...Ch. 1 - A government research lab has concluded that an...Ch. 1 - Write a program that starts with a line of text...Ch. 1 - Write a program for calculating the simple...Ch. 1 - Write a program that outputs the number of hours,...Ch. 1 - The following program will compile and run, but it...Ch. 1 - A simple rule to estimate your ideal body weight...Ch. 1 - Scientists estimate that roughly 10 grams of...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Internally, the CPU consists of what two units?

Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)

The__________ library function returns the cosine of anangle.

Starting Out with C++ from Control Structures to Objects (9th Edition)

What is the number of the first byte in a file?

Starting Out with C++: Early Objects (9th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY