Calculate the number of pounds and ounces in a given number of ounces. (16 ozs to a lb) Assume ounces stores a total number of ounces. Print the number of Ibs and ozs. Try to do this without declaring any new variables. (Use just a printing statement) For example, if ounces is 38, print "38 ounces is 2 Ibs, 6 ozs"

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

Java

 

 

Calculate the number of pounds and ounces in a given number of ounces. (16 ozs to
a lb) Assume ounces stores a total number of ounces. Print the number of Ibs and
ozs. Try to do this without declaring any new variables. (Use just a printing
statement)
For example, if ounces is 38, print "38 ounces is 2 Ibs, 6 ozs"
Transcribed Image Text:Calculate the number of pounds and ounces in a given number of ounces. (16 ozs to a lb) Assume ounces stores a total number of ounces. Print the number of Ibs and ozs. Try to do this without declaring any new variables. (Use just a printing statement) For example, if ounces is 38, print "38 ounces is 2 Ibs, 6 ozs"
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Introduction to computer system
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning