1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gladu [14]
3 years ago
12

Java code?????

Computers and Technology
1 answer:
12345 [234]3 years ago
5 0

Answer:

Explanation:

Here is the code for you:

import java.io.*;

import java.util.*;

class GirlScoutCookies

{

public static void main(String[] args)

{

int [] BoxesCategory = new int[5];

Scanner sc = new Scanner(System.in);

System.out.print("Total number of girls in the troop: ");

int numOfGirlScouts = sc.nextInt();

for(int i = 0; i < numOfGirlScouts; i++)

{

System.out.print("Boxes of cookies for girl #"+(i+1)+": ");

int boxes = sc.nextInt();

if(boxes >= 0 && boxes <= 10)

BoxesCategory[0]++;

else if(boxes >= 11 && boxes <= 20)

BoxesCategory[1]++;

else if(boxes >= 21 && boxes <= 30)

BoxesCategory[2]++;

else if(boxes >= 31 && boxes <= 40)

BoxesCategory[3]++;

else if(boxes > 40)

BoxesCategory[4]++;

}

System.out.println("TOTAL BOXES\tNUMBER OF GIRL SCOUTS");

System.out.println(" 0 to 10\t"+BoxesCategory[0]);

System.out.println("11 to 20\t"+BoxesCategory[1]);

System.out.println("21 to 30\t"+BoxesCategory[2]);

System.out.println("31 to 40\t"+BoxesCategory[3]);

System.out.println("41 or more\t"+BoxesCategory[4]);

}

}

And the sample output is:

You might be interested in
When computing the net cash provided by operating activities under the indirect method on the statement of cash flows, a decreas
levacccp [35]

Answer: False

Explanation:

The given statement is false, as in the indirect method there is decrease in the common stock value are not be subtracted from the net income because it is not the current liability.

In the cash flow method, the cash flow from the operating activities are prepared by using two methods that are:

  • Direct method
  • Indirect method

The cash flow indirect method, indicate the net income figure from the given income statement. It is basically used to represent the net cash with all the necessary earnings from the actual cash received.

3 0
3 years ago
________ allows only limited use of media that has been legally purchased.
Reptile [31]
Digital Rights Management (DRM) allows only limited use of media that has been legally purchased. The DRM includes access control technologies for <span>copyright protection for </span>digital media. DRM defines <span>what you as a software or hardware user can and can't do with the media and hardware you've purchased. </span> 
3 0
3 years ago
A(n) ________ is usually a live broadcast of audio or video content. Select one: A. instant message B. webcast C. podcast D. wik
navik [9.2K]

Answer: B webcast

Explanation:

A webcast is a technology that allows the live broadcast of an audio or video event on the Internet. It is also known as Web lecture, virtual meeting, etc. The major advantage is that it gives room for an event to have a larger reach. Webcast participation can be through PC, smart phones, tablets and other devices with quality Internet access.

7 0
4 years ago
Read 2 more answers
How good are vw beetle heaters in winter?
Vinvika [58]
It depends on the heater but in most case it works pretty well
7 0
3 years ago
​ The _____ attribute tells a browser to parse the HTML and JavaScript code together, only pausing to process the script before
slava [35]

Answer:

"async" attribute

Explanation:

the async attribute is used on the html script tag, it is a Boolean attribute indicating that the browser should, if possible, load the script asynchronously and then parse it as soon as it’s downloaded.

7 0
4 years ago
Other questions:
  • Consumers’ ability to ""time shift"" programs using DVRs and Internet video and other situations that lack simultaneity is an ex
    6·1 answer
  • You are given two variables, already declared and assigned values, one of type double, named price, containing the price of an o
    7·1 answer
  • James gets a job at a multinational corporation. On his first day at work, he finds out that the numerical code assigned by the
    10·1 answer
  • Which statement describes a mobile device feature? Docking stations can add some functionality to mobile devices such as video o
    11·1 answer
  • what are the benefits of VolP? select all that apply. A:cheaper printings B:clearer calls C: faster download D: increased effici
    11·2 answers
  • A chemical mixture that is burned to produce thrust. (Jet engine homework)
    14·2 answers
  • __ allow(s) users with mobility issues to control the computer with their voice.
    6·2 answers
  • Greedy Algorithm Design
    8·1 answer
  • Three reasons why users attach speakers to their computer
    8·1 answer
  • Worksheet-I • Make a list of 10 application software and 5 utility programs installed in your computer, along with their uses. U
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!