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
Describe how one device can send a bit to another device.
MArishka [77]
Describe how one device can send a bit to another device?

There are elements in order for a device to send a bit, first is the transmitter source where anelectronic device needs to send a message to another device; then the secondelement ofcommunication is the receiver source which receives a message and interprets it; a thirdelement would the medium which provides a pathway for the message to be send andreceive, and the message whether voice, data, image, signal or video where each of these<span>messages are sent across the medium first by converting then into binary digits, or bits.

I hope this helped! Please mark as Brainliest If i'm right! Have a Nice day!</span>
3 0
3 years ago
How to download a software program??
Makovka662 [10]

Answer:

you can download any software program from the internet a preferred site is softonic.com

3 0
3 years ago
Claire wants to include animations in her presentation slides. Which element of the presentation programs interface will have th
vaieri [72.5K]

Claire should use the integration element to include animations in her presentation slides.

6 0
3 years ago
Read 2 more answers
Can someone please help me! It’s due Thursday!
Eva8 [605]

Answer:

if the input is zero the out put is 1

Explanation:

because if you think about it if the input was 1 the output would be zero

7 0
2 years ago
Important tools used in the _____ phase of the DMAIC process include a project charter, a description of customer requirements,
pishuonlain [190]

Answer:

d. define

Explanation:

DMAIC is an acronym for Define, Measure, Analyze, Improve and Control is a data-driven improvement cycle used for improving processes and driving Six Sigma projects.

Important tools used in the define phase of the Define, Measure, Analyze, Improve, and Control (DMAIC) process include;

- A project charter.

- A description of customer requirements.

- Process maps.

- Voice of the Customer (VOC) data.

5 0
3 years ago
Other questions:
  • In a paragraph of no less than 125 words, describe how technology helps business professionals to be more efficient. Include exa
    12·2 answers
  • The TabIndex value assigned to a text box's identifying label must be _______________ for the text box's access key to work corr
    14·1 answer
  • Which of the operating systems listed below is not proprietary?
    8·1 answer
  • 7. The penalties for a first-time DUI charge include a fine of __________. A. up to $500 for a BAL of .08 to .15 B. $500-$1,000
    5·1 answer
  • MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use
    10·1 answer
  • Whic flag has a special role in debuging
    6·1 answer
  • A solid understanding of __________ is the foundation of verbal communication
    7·1 answer
  • Which federal agency enforces safety and health legislation and requires employers to be sure that adequate first-aid supplies a
    5·1 answer
  • Python3
    7·1 answer
  • Write an expression in Boolean algebra that evaluates to 1 when an odd number of bits of the number is 1 and 0 otherwise
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!