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
4/5 y = 8 , how do we solve pls help fast its urgent, I will mark u brainliest
Butoxors [25]

Answer:

y = 10

Step-by-step explanation:

4/5 y = 8

4/5 y * 5/4 = 8 * 5/4           multiply by reciprocal

y = 10

4 0
3 years ago
Read 2 more answers
If two angles are complementary they add up to
MArishka [77]

Answer:

90 degrees

I hope this helps!

3 0
3 years ago
How do you convert 5y-x+4=0 into y=mx+b form?
Mashutka [201]
5y-x+4=0

~Add x to both sides

5y+4=x

~Subtract 4 from both sides

5y=x-4

~Divide both sides by 5

\frac{5}{5}y= \frac{1x}{5}  - \frac{4}{5}

~Simplify

y= \frac{1}{5} x- \frac{4}{5}

~M= \frac{1}{5}

~B=-\frac{4}{5}

3 0
3 years ago
9•c•4. How do you solve this
ikadub [295]
9 times c times 4 is the same as 4 times 9 times c.  What is 4 times 9?

What is your final answer?
3 0
3 years ago
Jordan had 3/8 pound of candy. He gave some to his brother and now he only has 1/10 pound left. How much did he give to his brot
morpeh [17]

Answer:

11/40, 0.275

Step-by-step explanation:

3/8 divided by 1/10 is 11/40/0.275.

4 0
3 years ago
Other questions:
  • Tom gets a bonus of 30% of £96
    5·1 answer
  • Two equations are shown:
    7·1 answer
  • What is the volume, in cubic centimeters, of this cylinder? Please use 3.14 for π.
    10·1 answer
  • List 3 values that would make this inequality true 180&gt;15y
    12·2 answers
  • From 10:00 am to noon, the rise in temperature is 4 degrees C, and from 3:00 pm to 5:00 pm, the fall in temperature is 6 degrees
    13·1 answer
  • 7x+8x(9y-) respondaa por favorzinho​
    12·2 answers
  • Researchers in New Zealand interviewed 907 drivers at age 21. They had data on traffic accidents and they asked their subjects a
    13·1 answer
  • What is the approximate area of a circle with a radius of 6 m?
    14·2 answers
  • Hey my old account is ilikebug it got into minus points somehow so this is my new account
    11·1 answer
  • Quadrilateral HGEF is a scaled copy of quadrilateral DCAB. What is themeasurement of lin EG?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!