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
Pls help extra points and mark brainlist
Katyanochek1 [597]

Answer:

(12)3=36

Step-by-step explanation:

i don't know.. I think this is what the question is trying to say XD

6 0
3 years ago
Read 2 more answers
Whats the decimal equivalent of 1\4
Vesnalui [34]
The decimal equivalent of 1/4 is 0.25.
7 0
3 years ago
Select the correct answer.
Sidana [21]

Answer:c

Step-by-step explanation:

when you set (x-6) and (x-1) to zero you get 6 and 1

8 0
2 years ago
Bryan cut two peaches. he cut one into sixths and one into fourths.bryan ate 5sixths of the first peach and his brother ate 3fou
Oduvanchick [21]
Bryan : 5/6 = 20/24
Brother : 3/4 = 18/24
Answer Bryan ate more
4 0
3 years ago
PLEASE ANWSER ASAPPPPLL I NEED IT QUICK PLS SHAWTY
Marianna [84]

Answer:

c

Step-by-step explanation:

3 and 3/7 ok hope it helps

5 0
3 years ago
Read 2 more answers
Other questions:
  • What’s the answer to this problem???
    15·1 answer
  • 2 (7-4)÷6 find the value of the expression pls and thanks
    8·2 answers
  • Reduce to lowest term18/24
    5·2 answers
  • If P(x) = 0.35, find the complement
    6·1 answer
  • Which of the following values represents an index of refraction of an actual material? A. 1.25 B. 0 C. .25 D. .5
    15·1 answer
  • The measures of the angles of a triangle are shown in the figure below. Solve for x.
    6·1 answer
  • What inverse operation do you use to solve for m? <br><br> 11=m - 4
    14·2 answers
  • Can anyone help with this problem please ! i’m struggling with this question .
    11·1 answer
  • Please help me solve this!!!!!!
    6·2 answers
  • What is the transformation of C(9, 3) when dilated with a scale factor of 1/3,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!