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
Given MN is an angle bisector of ∠JMK Prove: M∠JMN = 1/2 M∠JMK <br><br> FOR BRAINLIEST
blagie [28]

An angle bisector is a line passing through the vertex of the angle that cuts the angle into two equal smaller angles.

If MN is angle bisector, then

m∠JMN=m∠NMK.

The two smaller angles are adjacent angles, then

m∠JMK=m∠JMN+m∠NMK=2m∠JMN.

Divide this equality by 2:

m\angle JMN=\dfrac{1}{2}m\angle JMK.

3 0
3 years ago
Elisa bought 5 bracelets for a total of $25.95. If the bracelets were the same cost, about how much did each bracelet cost?
Lady bird [3.3K]

Answer:

Step-by-step explanation:

To find out what each bracelet costed, you have to divide the total amount spent by how many bracelets were purchased.

25.95 ÷ 5 = 5.19

In conclusion, each bracelet cost $5.19. :)

4 0
3 years ago
If triangle STU is congruent to triangle VWX, which statement is not true?
Svetach [21]
If triangles are congruent then, their corresponding sides and angles should have the same measurement. From the given, STU is congruent to VWX, angle S, T, U should be congruent to angles V, W, and X, respectively. From the choices, the answer should be letter D. because U and V do not appear in the same order from both names. 
4 0
3 years ago
GEOMETRY- What is the area of the figure, show your work please!
Kamila [148]
Since this is a 45-45-90 right triangle, the hypotenuse = sqrt2 * leg
24 is the hypotenuse so we need to find the leg.
24 = sqrt2 * leg
Divide both sides by sqrt2
leg = 16.97
A = (1/2)b*h
A = (1/2)*16.97*16.97
A = 144ft^2
8 0
3 years ago
Please help im stuck ​
kolbaska11 [484]
It looks like the first 3 are because they all are blank x2.5 but the last one would be 8x2.5=20..
6 0
2 years ago
Other questions:
  • What is the answer to #4?
    10·1 answer
  • Nita uses 1/2 of a class period to read 1/12 of a book. How many periods must be set aside if she is to read the entire book?
    6·2 answers
  • Can someone help me with these math problems
    10·2 answers
  • In the triangle below x=? Round to the nearest tenth. Please help!
    13·1 answer
  • Pls help <br> (The ratio of fruit juice one)
    5·1 answer
  • Please factor each problem and submit the answer in Perfect Square Trinomial Form. Thank you so much!
    6·2 answers
  • Furmenticia pp no lol
    7·1 answer
  • Giving brainlist to whoever answers
    7·2 answers
  • Give 3 example of proposition?​
    5·1 answer
  • Which exponential function matches the table?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!