Hi Tom! I want to order a steak from this resturant in pounds, but I only know the ounces of the steak.
I don't know how to convert ounces to pounds off the top of my head, but I happened to make Java code that does just that. Follow me!
So, how does it work?... And where is the code?
One second, let me turn on my computer and pull up JGRASP Java.
Woah! This is sweet. I better do this quickly before the restaurant closes. 32 ounces equals 2 pounds! This code is amazing Tom, thank you. I better be going, I got to order a steak in pounds now!
/* * Andrew Donnelly * Period: 8- Java Honors * Write the program OuncesAndrewDonnelly * that takes in user input and outputs as a final exam code */ // This code takes in user input in ounces and outputs // the ounces in pounds, then ounces
Here is the code! Now you can convert ounces to pounds for your steak.