Question: Any help with this code would be great. Im trying to figure out the calculations. Thanks public static void main(String[] args) { import java.util.Scanner; public

Any help with this code would be great. Im trying to figure out the calculations. Thanks

public static void main(String[] args) { import java.util.Scanner;

public class Fruit Inventory {

public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int numApples = 0; int numOranges = 0; int InStock = 0; int totalOranges = 0; int totalApples = 0;

final orangesNeeded, applesNeeded = 50; minimum numApples; final minimum numOranges = 25;

System.out.println(How many apples on hand?); numApples = scnr.next();

// Obtain number of oranges System.out.println("How many oranges on hand?"); numOranges= scnr.next();

// Calculate how many apples in stock totalApples = numApples + inStock; System.out.println("totalApples: numApples + " inStock");

// Calculate how many oranges in stock totalOranges = numOranges / inStock; System.out.println("totalOranges: " + numOranges + " inStock");

// Calculate how many of each should be ordered orangesNeeded = applesNeeded=

return; } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!