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
What does pagination mean in Microsoft Word?
marin [14]

it means to alt f4 then that would help so it can eat the microscope then have it digested

5 0
3 years ago
Read 2 more answers
How to calculate standard deviation on excel?
Anarel [89]
<span>I believe you use the Excel Formula =STDEV( ) and select the range of values which contain the data. This calculates the sample standard deviation (n-1).</span>
5 0
3 years ago
How many components of a computer? ​
zepelin [54]

Answer:

There are five main hardware components in a computer system: Input, Processing, Storage, Output and Communication devices. Are devices used for entering data or instructions to the central processing unit.

Explanation:

8 0
3 years ago
Given that an integer variable i and a floating-point variable f have already been declared and given values: Write a statement
Wewaii [24]

Answer:

Follows are the given statement to this question:

printf("i=%d f=%f", i, f);//print value

Explanation:

The full code to the given question:

code:

#include <stdio.h>//defining header file

int main()// main method

{

   int i;//declaring integer variable

   float f;//declaring float variable

   i=25; //assign integer value

   f=12.34;//assign float value

   printf("i=%d f=%f", i, f);//print value

   i=703;//assign integer value

   f=3.14159;//assign float value

   printf("\n");//for line break

   printf("i=%d f=%f", i, f);//print value

   return 0;

}

Output:

i=25 f=12.340000

i=703 f=3.141590

In the above-given code, the two variable "i and f" is declared, that holds integer and floating-point value in its respective variable and use the print method, to print "i and f" variables value.  

6 0
3 years ago
Which ribbon tab is not a default in Outlook 2016's main interface?
Verizon [17]

Answer:

review

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which pane displays commands that change relative to the activity taking place in the presentation window's main work area?
    11·2 answers
  • Hard drives have the largest capacity of any storage device. <br> a. True <br> b. False
    6·2 answers
  • Write a program that reads a stream of integers from a file and writes only the positive numbers to a second file. The user shou
    5·1 answer
  • By using ____, you can use reasonable, easy-to-remember names for methods and concentrate on their purpose rather than on memori
    6·1 answer
  • The point of entry from a wireless device to a wired network is performed at a device called a(n) ____________________.
    10·1 answer
  • Gigantic Life Insurance is organized as a single domain. The network manager is concerned that dividing into multiple domains to
    15·1 answer
  • Which is the fastest CPU and why?
    5·1 answer
  • Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as t
    14·1 answer
  • What software can be used for remote operation of a sunsdr2 dx?.
    13·1 answer
  • When users connect to the network, they use a basic hardware terminal to access a desktop hosted on a virtualization server. wha
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!