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
11111nata11111 [884]
3 years ago
12

First, allow the user to enter a numeric value representing how many names they would like to enter. Next, create an array with

its size based on that value. Once the array is created, allow the user to enter in names until the array is full. Again, use a for loop to do this

Mathematics
1 answer:
Alexxandr [17]3 years ago
3 0

Answer:

//Scanner class is imported to allow program receive user input

import java.util.Scanner;

//The Solution class is defined

public class Solution {

   // main method that begin program execution is declared

   public static void main(String args[]) {

       // Scanner object scan is created

       Scanner scan = new Scanner(System.in);

       // A prompt is displayed to the user

       // the prompt asked the user to enter a number

       System.out.println("Enter a number: ");

       // the user input is assigned to a variable size

       int size = scan.nextInt();

       // an empty string name is initialized

       String name = "";

       

       // A string array called names is initialized

       // have the inputed number as size

       String names[] = new String[size];

       // A for-loop that allow a user to enter name

       // and fill the array with it

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

           // A prompt is displayed asking the user to enter a name

           System.out.println("Enter a name: ");

           // the received input is assigned to name

           name = scan.next();

           // name is assigned to an index

           names[i] = name;

       }

       

       // A blank line is printed for clarity

       System.out.println();

       // for-loop to loop the array and print the entire element

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

           System.out.println(names[i]);

       }

   }

}

Step-by-step explanation:

The program is well commented and written in Java. A sample image of program output during execution is attached.

You might be interested in
The perimeter of a piece of paper is 38 inches. Its length is 11 inches.
Rainbow [258]

Answer:

Buddy this might not be the correct answer but I got either 98 or 418 inches. Don't quote me on it though.

Step-by-step explanation:

7 0
3 years ago
I need help for B it’s due tomorrow :(((
zmey [24]

Answer:

Percent Proportion

A percent proportion is an equation where a percentage (%) of the whole is equal to the part of the whole or we can say it is an equation where a percent is equal to an equivalent ratio.

What is Percent Proportion?

When the ratio of part to whole is equal to the ratio of a percent to 100, shows a percent equal to an equivalent ratio, we call it a percent proportion. A percentage is a fraction expressed with 100 as the denominator. When two ratios are equal, they are said to be in proportion. Proportions are denoted by using the symbols "=" or "::". For example, 1/5 :: 20/ 100, and the given proportion is read as "1 is to 5 equals to 20 is to 100".

Percentage in the Form of a Fraction Shows Proportion

Following are the given examples that show how the percentage is converted into fractions and shows the proportion.

25% means 25 parts out of 100 and 25/100 = 1/4 of the total parts (whole). So, the given proportion is read as "25 is to 100 equals to 1 is to 4".

40% means 40 parts out of 100 and 40/100 = 2/5 of the total parts (whole). So, the given proportion is read as "40 is to 100 equals to 2 is to 5".

75% means 75 parts out of 100 and 75/100 = 3/4 of the total parts (whole). So, the given proportion is read as "75 is to 100 equals to 3 is to 4".

Percent Proportion Formula

The percent proportion formula helps in solving problems. It is expressed in form of PART/WHOLE = PERCENT/100, where,

PERCENT is the number with a percent sign.

PART is the number with the word IS.

WHOLE is the number with the word OF.

For example, 30 is what percent of 60? Here IS and OF are used in question where IS is PART and OF is WHOLE. Now with the help of formula, Part/Whole = Percent/100 ⇒ 30 / 60 = Percent /100 ⇒ Percent = (30 / 60) × 100 = 50%

Taking another example, What number is 10 % of 50?

Part/Whole = Percent/100 ⇒ Part/50 = 10/100 ⇒ Part = 5. Therefore, 10% of 50 is 5.

Percent proportion

Related articles on Percent Proportion

Check out these interesting articles to know more about the percent proportion and its related topics.

Ratio and Proportion

Percentages

Fraction to Percent

Percent proportion calculator

6 0
2 years ago
Read 2 more answers
If a person has the values for an object's density and volume, what value can be calculated? the object's size the object's mass
irina [24]

Answer:

The object's mass.

Explanation:

The formula d=m/v.

d --> density

m--> mass

v --> volume

With density and volume given, you can calculate the mass of the object.

8 0
3 years ago
Read 2 more answers
Find f(g(h(x))) from functions below..
Lilit [14]

Answer:

f(g(h(x))) = (\sqrt{x} - 8)^4 + 8

Step-by-step explanation:

f(x) = x^4 + 8

g(x) = x - 8

h(x) = \sqrt{x}

f(g(h(x))) = f(g(\sqrt{x})) = f(\sqrt{x} - 8) = (\sqrt{x} - 8)^4 + 8

4 0
3 years ago
Solve 8x2 - 7 = 193.
Gelneren [198K]

Answer:

Hi, there the answer is B. Trust me

Step-by-step explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Find how many six-digit numbers can be formed from the digits 2, 3, 4, 5, 6 and 7 (with repetitions), if:
    15·2 answers
  • the train to hogwarts is moving at a speed of 120 mph. if hogwarts is 420 miles away, how long will the students train ride be ?
    9·2 answers
  • Complete the pattern 4,15,7,12,10,9 ? ? ? show me how you got your work
    13·2 answers
  • 3X-1=4 THEN 2X= ...?
    10·1 answer
  • Solve x for 3х – 1 = - 13
    11·2 answers
  • Which of the following would be the best step to make first when simplifying the expression
    5·1 answer
  • How do you do this question?
    12·1 answer
  • Lyra and Donna are testing the two-way radios they built for their high school science project. Lyra goes to the top of a buildi
    7·2 answers
  • PLEASE HELP WILL MARK BRAINLIEST<br><br> Draw the reflection of the figure over the line shown.
    5·1 answer
  • If f(x) = 3x²-4 and g(x) = x+2, find (f - g)(x).
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!