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
63a-42b Please help!
Gennadij [26K]
21(3a-2b) hope this help !
I’m sorry if I’m wrong
7 0
3 years ago
Plz HELP!!
Juli2301 [7.4K]

Answer:

1st, 2nd, and 4th

Step-by-step explanation:

8 0
2 years ago
-4(-2z + 2) = 6z + 8
Savatey [412]
8z-8=6z+8
8x-6z=8+8
2z=16
Z=8
8 0
3 years ago
Read 2 more answers
What is the slope of the following equation? <br> y = 1/3x + 4
Alexxx [7]

Answer:

The slope is 1/3

Step-by-step explanation:

The equation is written in slope-intercept form. This is shown as y=mx+b where m is the slope and b is the y-intercept.

m is 1/3 because of this

Hope this made sense!

8 0
3 years ago
Use your calculator to work out this equation
alisha [4.7K]

Answer:

2.123842852 is the first answer

for part b it'll be 2.12

hope that helps

Step-by-step explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which point of reference is the curve y3 + y = x3 + x symmetric about?
    12·1 answer
  • Finally, the arena decides to offer advertising space on the jerseys of the arena's own amateur volley ball team. The arena want
    6·2 answers
  • Drawing from a bag that contains 5 red apples, 7 green apples, and 2 oranges. You pick, keep it and pick again.
    6·2 answers
  • HELP ME ASAP PLEASE
    12·1 answer
  • Write an equation in whatever form you choose with the given characteristics Parallel to y = 3/5x - 8 and passes through (0, -3)
    15·1 answer
  • Starr buys Converse shoes from the manufacturer for $25.50 a pair, she sells them for $38.50, what percent is she marking them u
    7·1 answer
  • Students in Mr. Rivas’ class were practicing their multiplication skills by rolling three 6-sided number cubes. Chris rolled a 2
    15·2 answers
  • Find the fractal dimension of the object.
    12·1 answer
  • Sophia is designing the seating arrangement for a concert and
    5·1 answer
  • Which angle is a vertical angle with AngleEFD?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!