Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

=+ Who do you think is right? Why?

Answered: 1 week ago