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
Spreadsheets are sometimes credited with legitimizing the personal computer as a business tool. Why do you think they had such a
Paladinen [302]

Spreadsheets is known to be an credited tool with legitimizing the personal computer as a business tool. Spreadsheets have a lot of impact in business world because:

  • It has low technical requirement. Here, spreadsheet does not need a complex installation and it is easy to understand.
  • Data Sifting and Cleanup is very easy to do.
  • It is a quick way to Generate Reports and Charts for business.

<h3>What is Spreadsheets?</h3>

Spreadsheets is known to be a key  business and accounting tool. They are known to have different complexity and are used for a lot of reasons.

The primary aim of this is that it helps us  to organize and categorize data into a kind of logical format and thus helps us to grow our business.

Learn more about Spreadsheets from

brainly.com/question/4965119

8 0
3 years ago
Write a program to demonstrate circular linked list with operations using pointers – insert
BabaBlast [244]

A program to demonstrate circular linked list with operations using pointers is:

struct Node *addToEmpty(struct Node *last, int data)

{

   // This function is only for empty list

   if (last != NULL)

     return last;

 

   // Creating a node dynamically.

   struct Node *temp =

         (struct Node*)malloc(sizeof(struct Node));

 

   // Assigning the data.

   temp -> data = data;

   last = temp;

   // Note : list was empty. We link single node

   // to itself.

   temp -> next = last;

 

   return last;

}

<h3>What is a Circular Linked List?</h3>

This refers to the type of linked list in which the first and the last nodes are also joined together other to form a circle

Read more about circular linked list here:

brainly.com/question/12974434

#SPJ1

5 0
2 years ago
Which are Career and Technical Student Organizations? (Check all that apply.)
ivolga24 [154]

Answer: BPA (Business Professionals of America)

DECA (formerly Distributive Education Clubs of America)

Educators Rising.

FBLA-PBL (Future Business Leaders of America-Phi Beta Lambda)

FCCLA (Family, Career, and Community Leaders of America)

FFA (formerly Future Farmers of America)

Explanation: these are all i cant think of at the moment. sorry! but i hope this helps :)

4 0
3 years ago
Where in the Formula tab on the ribbon would you find the Use in Formula function?
Leviafan [203]

Answer:

In Function library you would find the use in Formula function

5 0
3 years ago
Read 2 more answers
A _____ is a character or group of characters that has a specific meaning. a. field b. record c. file d. database
zubka84 [21]

A character or collection of characters with a specific meaning is called a field.

<h3>What does the technical term "field" mean?</h3>

A field is a purpose-driven, typically fixed-sized section in a fixed or known location within a unit of data, such as a record, message header, or computer instruction. A field may be divided into smaller fields depending on the situation.

<h3>What does a file structure field mean?</h3>

A record is an entire set of fields, a field is a single piece of information, and a file is a collection of records. An analogy between a file and a phone book is a phone book. There is a list of records in it, and each record has three fields: a name, an address, and a phone number.

learn more about field here  

<u>brainly.com/question/28002617</u>

#SPJ4

8 0
1 year ago
Other questions:
  • Tower defense is included under which genre of game
    15·2 answers
  • Mark had been a resident of Larchmont for 17 years, and local folks thought of him as a solid citizen. "In this sentence, the wo
    7·2 answers
  • What are 3 characteristics of syndrome E?
    13·1 answer
  • Which of the following is a list of input devices?
    13·2 answers
  • A(n) _____ is a computer program that can damage files and programs on your computer.
    6·2 answers
  • Moore's Law postulates that:This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this t
    6·1 answer
  • On his website, Mario has a video that visitors must click to play. He wants the video to play automatically when the page loads
    9·1 answer
  • Which of the data repositories serves as a pool of raw data and stores large amounts of structured, semi-structured, and unstruc
    9·1 answer
  • How scientist and technology beliefs society
    14·1 answer
  • A(n) __________ structure is a structure that causes a statement or a set of statements to execute repeatedly.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!