dumbluii
dumbluii dumbluii
  • 09-10-2020
  • Computers and Technology
contestada

Write a java program that accepts the ingredients for a recipe in cups and converts to ounces

Respuesta :

sandlee09
sandlee09 sandlee09
  • 13-10-2020

Answer:

Explanation:

public static int cupsToOunces (int cups) {

   

       int ounces = cups * 8;

       return ounces;

       

   }

This is a very simple Java method that takes in the number of cups in the recipe as a parameter, converts it to ounces, and then returns the number of ounces. It is very simple since 1 cup is equal to 8 ounces, therefore it simply takes the cups and multiplies it by 8 and saves that value in an int variable called ounces.

Answer Link

Otras preguntas

Suppose the circumference of a circle is 8π. What is its area?
the book The Outsider question why does Dally want Ponyboy to be tough and hard like him rather than be like Johnny? Do you think Dally believes his own advic
is .875 five eights of an inch
How do you do the equation 3.25 divided by 5.2
2*12 ^(n) = 49 N= exponent
Hello everyone! This is all about simile can you answer this?Instruction: What are compared in the following lines? What do the two unlike objects have in commo
Friction between a skateboard wheel and the surface produces             ?
the second largest prime factor of 38 is
Danica has laid out floor tiles so they from a rectangle with a perimeter of 18 inches what is the difference between the greatest and least possible areas of t
Write the equation of the line: Passing through (-2,7), having slope -4 over 9