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
marusya05 [52]
3 years ago
8

Assignment 2 edhesive

Computers and Technology
2 answers:
tamaranim1 [39]3 years ago
8 0
Did u mean to add a picture of it?
zmey [24]3 years ago
5 0

Answer:

wat

Explanation:

You might be interested in
Write a program that prompts the user for an integer, then asks the user to enter that many values. Store these values in an arr
Svetllana [295]

Answer:

//The Scanner class is imported to allow the program receive user input

import java.util.Scanner;

//The class Solution is defined

public class Solution {

   //The main method is defined here and signify the beginning of program execution

   public static void main(String args[]) {

       

       //Scanner object 'scan' is created to receive user input

       Scanner scan = new Scanner(System.in);

       //Prompt display to the user to enter size of array

       System.out.print("Enter the range of array: ");

       //User input is assigned to arraySize

       int arraySize = scan.nextInt();

       //userArray is initialized with arraySize as its size

       int[] userArray = new int[arraySize];

       

       //counter to count number of array element

       int count = 0;

       //while loop which continue executing till the user finish entering the array element

       while (count < arraySize){

           System.out.print("Enter each element of the array: ");

           userArray[count] = scan.nextInt();

           count++;

       }

       

       //A blank line is printed for clarity

       System.out.println();

       

       //for loop to print each element of the array on straight line

       for(int i =0; i <userArray.length; i++){

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

       }

       

       //A blank line is printed for clarity

       System.out.println();

       

       //for loop is use to reverse the array in-place

       for(int i=0; i<userArray.length/2; i++){

           int temp = userArray[i];

           userArray[i] = userArray[userArray.length -i -1];

           userArray[userArray.length -i -1] = temp;

       }

       

       //for loop to print each element of the reversed array on straight line

       for(int i =0; i <userArray.length; i++){

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

       }

     

   }

}

Explanation:

The program is commented to give detailed explanation.

The for-loop use in reversing the array works by first dividing the array into two half and exchanging the first half elements with the second half elements. The element from the first half is assigned to temp variable on each loop, then the element is replaced with the equivalent element from the second half. And the element from the second half is replaced with the value of temp.

3 0
3 years ago
Which asynchronous electronic community is also known as a forum?
Semmy [17]
What are the choices?
Message Boarding is the asynchronous electronic that is know as a forum.
3 0
4 years ago
Read 2 more answers
Which computer can perform the single dedicated task? a. Which commuter can perform the function of both analog and digital devi
vredina [299]
<h3>a= hybrid computer can perform the function of both analog and digital computer</h3>
8 0
3 years ago
Modern fax machines use _______ to transmit text.
KatRina [158]
Modern fax machines use senors to transmit text.
hope this helps:)
3 0
4 years ago
Read 2 more answers
Ask one of your parent, grandparent or elder relatives about the popular song during their time they consider their favorite. As
inysia [295]

Answer:

Babooshka by Kate bush

Explanation:

My dad likes this song because it has a very nice beat

I find this sond interesting because the vocals and pitch end up sounding different than you would expect them to be. Also the range of the singer (Kate bush) is amazing

4 0
3 years ago
Other questions:
  • Andrea wants to to install a new internet connection . she eants to use the fastest one she can find . what are the maximum spee
    14·1 answer
  • What is the correct order of operations for protecting a critical section using a binary semaphore?
    15·1 answer
  • To pinpoint an earthquake's location, scientists need information from how many seismometers?
    8·1 answer
  • Of the listed principles, which one states that multiple changes made to computer systems shouldn’t be made simultaneously?
    9·1 answer
  • Where can you go in QuickBooks Online to import a list of products and services? Select the Quick Create icon and under the Tool
    12·1 answer
  • Fill in the blanks of the SQL Statements: Fund_Id VARCHAR(10) , Donor_id VARCHAR(10) , Count_Of_Receipts INTEGER, Total_Receipts
    15·1 answer
  • You're a short-order cook in a pancake restaurant, so you need to cook pancakes as fast as possible. You have one pan that can f
    14·1 answer
  • Join my among us code<br> SHUHZF
    6·2 answers
  • When adopting and implementing a Software as a Service (SaaS) platform such as Salesforce for your business, which responsibilit
    7·1 answer
  • Use a for loop to output the numbers from 50 to 65
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!