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
MissTica
3 years ago
10

5-16) (Bar Chart Printing Program) One interesting application of computers is to display graphs and bar charts. Write an applic

ation that reads five numbers between 1 and 30. For each number that’s read, your program should display the same number of adjacent asterisks. For example, if your program reads the number 7, it should display *******. Display the bars of asterisks after you read all five numbers.
Computers and Technology
1 answer:
gavmur [86]3 years ago
8 0

Answer:

public class BarChartPrinting {

   

   public static void main (String [] args) {

       

       int numbers[] = new int[5];

       Scanner input = new Scanner(System.in);

       

       for (int i = 0; i < 5; i++){

           System.out.print("Enter a number between 1 to 30: ");

           numbers[i] = input.nextInt();

       }

       for (int i = 0; i < 5; i++){

           for (int j = 0; j < numbers[i]; j++){

               System.out.print("*");

           }

           System.out.println("");

       }

   }

}

Explanation:

- Initialize the <em>numbers</em> array to hold the numbers

- Inside the <u>for loop</u>, get the numbers from the user and put them in the <em>numbers</em>

- Inside the <em>nested for loop</em>, print the asterisks, depending on the number that is in the <em>numbers</em> array

The outer loop will iterate five times corresponding to the each number in the array, and inner loop will print the asterisks depending on the value of the number

You might be interested in
_________ is the biggest problem you can face if you don’t identify the scope of your risk management project. Scope creep Nonco
mart [117]

Answer: Scope creep

Explanation:

 Scope creep in the project management basically refers to the uncontrolled development or growth in the project creep. It basically occur when the project scope are not appropriately defined.

It usually involve lack of change in the control system and increase the complexity of the project. It is also has poor requirement analysis.

So, that is why it is the biggest problem we usually face in the project management.

5 0
3 years ago
Which of the statements below is false? Question 19 options: a) You can install a 64-bit operating system on a 64-bit machine. b
diamong [38]

you can install a 64 bit operating system on a 32 bit machine.

hope this helps!

5 0
4 years ago
20 POINTS!!!!!!!!!! will give brainliest
PilotLPTM [1.2K]

Answer:

Release

Explanation:

Founders Education

4 0
3 years ago
Explain the function of different flags in the 8086<br>​
posledela

Answer:

A flag is a piece of fabric (most often rectangular or quadrilateral) with a distinctive design and colours. It is used as a symbol, a signalling device, or for decoration.8086 has 16-bit flag register, and there are 9 valid flag bits.The FLAGS register is the status register in Intel x86 microprocessors that contains the current state of the processor. This register is 16 bits wide. Its successors, the EFLAGS and RFLAGS registers, are 32 bits and 64 bits wide, respectively. The wider registers retain compatibility with their smaller predecessors.

5 0
3 years ago
You should always buy the biggest camera bag that you can find for extra equipment.
Akimi4 [234]

Answer:

true

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the maximum upload speed you can get on an isdl internet connection?
    9·1 answer
  • Which factor did not contribute to the increase of leisure travel in the early twentieth century in the United States?
    7·2 answers
  • What is the root of the tree?
    6·1 answer
  • Convert each of the fo" wing base ten representations to its equivalent binary form a. 6 b. 13 C. d. 18 e. 27
    6·1 answer
  • What is the difference between the Internet and the World Wide Web? Explain in your own words.
    13·2 answers
  • What gaming PC should I get
    14·2 answers
  • Examples of system software include operating systems like macos, Linux, Android and
    10·2 answers
  • Write any one method to delete a table in writer​
    11·1 answer
  • Consider the method get Hours, which is intended to calculate the number of hours that a vehicle takes to travel between two mil
    6·1 answer
  • Consumers affect which goods and services are produced because they _____.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!