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
bogdanovich [222]
3 years ago
13

Write a for loop to populate array userGuesses with NUM GUESSES integers. Read integers using Scanner. Ex If NUM GUESSES is 3 an

d user enters 9 5 2, then userGuesses is 19, 5, 2) 1 import java til. Sca nner 3 public class Store Guesses 4 public static void main (string args) Scanner SCnr new Scanner (System in final int NUM GUESSES int[] user Guesses new int[NUM. GUESSES] int 0; Your solution goes here 10 for (i 03 i NUM GUESSES ++i){ 11 user Guesses [i] scnr.nextInt 12 13 14 15 for (i 0; i NUM GUESSES ++i) 16 System.out print (u 17 18 19 for (i 0; i NUM GUESSES ++i)t 20 System Ou print (userGuesses[i] 21 Run X Testing for 12, 4, 6) 2 4 6 Expected output Your output 2 4 6 2 4 6 Tests aborted
Computers and Technology
1 answer:
inn [45]3 years ago
7 0

Answer:  

import java.util.Scanner;  

public class StoreGuesses {  

  public static void main (String [] args) {  

      Scanner scnr = new Scanner(System.in);  

      final int NUM_GUESSES = 3;  

      int[] userGuesses = new int[NUM_GUESSES];  

      int i = 0;  

     

      for (i = 0; i < NUM_GUESSES; ++i){  

          userGuesses[i] = scnr.nextInt();  

      }  

      for (i = 0; i < NUM_GUESSES; ++i){  

          System.out.print(userGuesses[i] + " ");  

      }  

  }  

}  

/*

Output:

2 4 6  

2 4 6  

*/

You might be interested in
Create java program for these 2 question
morpeh [17]

1 see what you can do and go from their

7 0
3 years ago
Which is a challenge in photographing forests
Murljashka [212]
Getting the right angle, making sure their is detail in the image

8 0
4 years ago
Read 2 more answers
What is usually written in block style with the body text along the left margin.
Effectus [21]
A Business letter

6ix9ine
4 0
3 years ago
One difference between Windows 3.0 and Windows 2.0 was that users could no longer use MS-DOS commands to operate their computer.
Kipish [7]

the answer is false.

6 0
3 years ago
Simon is trying to figure out how much it will cost to buy 30 cases of water for a school picnic. How much will Simon pay for 30
faltersainse [42]
It depends on price, brand, number of bottles per case, and number of fluid ounces per bottle.

(price per bottle x number of bottles per case) x 30
7 0
3 years ago
Read 2 more answers
Other questions:
  • You have been doing a lot of web surfing lately as part of your research for your course and along the way you have noticed a gr
    14·1 answer
  • A user would like to format an arrow that has been inserted into a chart. What is the most efficient method for completing this
    9·1 answer
  • When should students practice netiquette in an online course? Check all that apply.
    14·2 answers
  • Does players report you on Mobile legends bang bang for playing your own Music while your playing yes or no
    11·1 answer
  • Suppose a program takes 1000 machine instructions to run from start to end, and can do that in 10 microseconds when no page faul
    9·1 answer
  • (40 pointsAnd brainliest answer ASAP) Maria is recording her friend’s graduation ceremony. How can Maria ensure that the video i
    15·1 answer
  • To run a PHP application that has been deployed on your own computer, you can enter a URL in the address bar of your browser tha
    13·1 answer
  • I have answered 22 questions and my messages are still not working what is it that i'm doing wrong?
    6·1 answer
  • write a program in C# that reads a set of integers and then finds and prints the sum of the even and odd integers?​
    12·1 answer
  • I need help here thanks forever who helps
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!