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
solmaris [256]
3 years ago
12

Create a static method called fillArray, which takes an integer array as an input parameter, along with an integer initial value

. It should then fill the array with values starting from the initial value, and counting up by 1s. For example, if the data array has length 5, and if the initialValue is 3, then after execution the array should hold this sequence: 3 4 5 6 7. public static void fillArray (int[] data, int initialValue) {
Computers and Technology
1 answer:
JulijaS [17]3 years ago
3 0

Answer:

public class print{

   

   public static void fillArray(int[] arr, int initialValue){

       

       int n = arr.length;

      for(int i=0;i<n;i++){

          arr[i] = initialValue++;

      }

       for(int i=0;i<n;i++){

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

      }

       

   }

    public static void main(String []args){

       

        int[] array = new int[5];

        int initialValue =3;

       

        fillArray(array,initialValue);

       

    }

}

Explanation:

Create the function with two parameter first is array and second is integer.

Then, declare the variable and store the size of array.

Take the for and fill the array from the incremented value of initialValue  by 1 at every run of loop.

After loop, print the element of the array.

Create the main function which is used for calling the function and also declare the array with size 5 and initialValue with 3. After that, call the function with this argument.

You might be interested in
you turn on your desktop computer. You can hear the fans start up, but the monitor remains blank. You wait a while, but it doesn
brilliants [131]

Answer:

Processor , Video-card  , Memory

Explanation:

If you turn on your desktop computer and the monitor remains blank, the problem might either be as a result of Processor not working, Video card bad and memory not sitting well.

if the problem is associated with processor, do the following:

  • Check if the power LED light on the motherboard is on or off.
  • If the LED light is off, check for motherboard or power supply issues.
  • If the LED light is on, check if the processor fan spins when the system is powered on.

Another major cause could be that the Video card is bad first thing to do is Update the drivers, then reseat the Videocard or probably change it.

Lastly memory module is loose, the computer might not display an image. In other words, your computer starts but the screen is black.

Now, you can try resetting the memory modules to fix the "PC turns on but no display" issue. Remove memory module from the memory slot, and then put it back into the slot to get a better connection so that the computer can recognise the memory.

8 0
3 years ago
Software applications called _____ provide the means to record information that passes through a computer or router that is hand
Bezzdna [24]

Answer:

sniffer programs

Explanation:

Software applications called <u>sniffer programs</u>  provide the means to record information that passes through a computer or router that is handling Internet traffic.

3 0
3 years ago
What is the output from main (below) after the following function is called. void calculateCost(int count, double&amp; subTotal,
GalinKa [24]

Answer:

     

Explanation:

7 0
3 years ago
Which tab is used to insert a hyperlink onto a slide
Roman55 [17]
The tab used to instead a Hyperlink into a slide is the Insert tab under the “Links” group.
5 0
3 years ago
Read 2 more answers
How do I turn on your asus chromebook flip?
galben [10]
I believe the charger has to be connected for it to turn on.
3 0
3 years ago
Other questions:
  • a supermarket having a sale on canned foods' the sale includes 12 cans of soup for 10.65 what is the unit price per can of soup
    6·2 answers
  • Isaac is researching Abraham Lincoln’s life for a social studies report. He finds an encyclopedia that includes original letters
    5·2 answers
  • WHICH OF THE FOLLOWING LOOKS JUST LIKE A CD ROM BUT CAN STORE MUCH MORE INFORMATION
    8·2 answers
  • (50 points) Write a program arrays1.cthat checks if two integer arrays are different by one and only one elementwhen compared el
    5·1 answer
  • In a ring-based system, procedure p is executing and needs to invoke procedure q. Procedure q's access bracket is (5,6,9). In wh
    15·2 answers
  • To print a range of cells in the active worksheet, click ____ in the settings area in the print gallery.
    14·1 answer
  • These items describe guidelines for the effective use of presentation graphics. Graphics should be large enough to be seen by th
    9·1 answer
  • When would you use the AutoFit to Contents option?
    15·1 answer
  • You began a small mobile app company. To help market your apps, you create a social media site. The site allows users to join co
    15·1 answer
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!