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
An operator can be overloaded to define functionality that is drastically different from the original operator.
zvonat [6]
A. True

Explanations:

You can redefine or overload the function of most built-in operators in C++. These operators can be overloaded globally or on a class-by-class basis. Overloaded operators are implemented as functions and can be member functions or global functions. An overloaded operator is called an operator function.
5 0
2 years ago
Describe what skills are required by the helpdesk technician for each step in a typical incident process.
LuckyWell [14K]
Not sure if this is whqat you are refering to. But here goes:<span>Typical steps in an incident process.</span>
Recieving--Incident is reported
Validating--incident verified as valid for the help desk to address
Logging--ticket entered into an incident application
Screening--determine symptoms
Prioritizing--determine importance of incident
Assigning--handle or escalate
Escalating--refering to higher level tier
Resolving--problem resolved
Closing--logging resolution and changing ticket status
Hope this helped.

4 0
3 years ago
A type of touch screen that can be up to four feet by six feet is a(n) _____. plasma screen multitouch interface Electronic Pape
zlopas [31]
<span>a multi touch interface</span><span />
5 0
3 years ago
Read 2 more answers
HELP ASAP! &gt;&gt; An inexperienced accountant for Culver Corporation showed the following in the income statement: income befo
Paladinen [302]

Answer:

Dont worry dude im here for you but your answer is 158,000 for 25% of it

Explanation:

7 0
3 years ago
Which is the most commonly used network card? network or WiFi <br>​
weeeeeb [17]

Answer:

i think both

Explanation:

because some houses haven't money to pay wifi for monthly and they use from network ntc or ncell .And some houses use wifi specially they don't want to use ncell .

3 0
3 years ago
Other questions:
  • Observing users as they enter passwords or other personal information to a computer Auditing software often used to test compute
    6·1 answer
  • While working on a presentation, Jack lost all the data because he switched off his computer unknowingly. On which of these comp
    6·2 answers
  • Where does microsoft word put elements such as text, logos, or graphics saved for later use in a document?
    15·1 answer
  • What 3 types of technologies are used inside hard drives?
    15·1 answer
  • Which of the following statements about personality tests are true? Check all of the boxes that apply.
    12·1 answer
  • How many license plates are there if a license plate contains 3 letters from the 26 available in the English alphabet followed b
    15·1 answer
  • Where Can I Get Actual Microsoft AZ-900 Exam Questions?
    11·1 answer
  • What is one purpose of an essay’s conclusion paragraph?
    13·1 answer
  • A two-dimensional array has been defined to hold the quantity of each of 5 different healthy snack products sold in a tuckshop d
    10·1 answer
  • The parental control service is experiencing technical difficulties.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!