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
Irina-Kira [14]
3 years ago
12

Assume the method dosomething has been defined as follows: public static void dosomething (int[] values, int p1, int p2) { int t

emp = values[p1]; values[p1] = values[p2]; values[p2] = temp; } what does the method do?3
Mathematics
1 answer:
Fudgin [204]3 years ago
4 0
First step is to analyze input and output variables:
INPUT:
list of integers with name "values"
integer with name "p1"
integer with name "p2"
OUTPUT:
there is no output variable as in declaration of a method there is void

ANALYSIS:
"<span>int temp = values[p1]"
this line creates variable "temp" which is integer. then this line goes to the list "values" and takes value that is at position "p1" and stores it into variable "temp"

"</span><span>values[p1] = values[p2]"
this line </span>goes to the list "values" and takes value that is at position "p2" and stores it into variable that is at position "p1"

"<span>values[p2] = temp"
this line takes value of the variable "temp" and stores it into list values at position "p2"

Short explanation:
this code replaces values of the list at between positions p1 and p2</span>
You might be interested in
Which algebraic expression represents this phrase?
Westkost [7]

The word "product" means <em>multiplication </em>

that means the answer is

40 · d

5 0
3 years ago
Which is greater 2.48 or 2.83
Artist 52 [7]

Answer:

2.83 is larger by 0.35

Step-by-step explanation:

3 0
3 years ago
Read 2 more answers
If 55% is 70.4 so what is hundred percent​
hodyreva [135]

Answer:

55%=70.4

1%=70.4/55= 1.28

100%=1.28into 100 = 128

8 0
3 years ago
Please help <br><br>y≥1/3x-3​
zloy xaker [14]

Answer:

B, the one with the line and shaded the top on the right side. (The one that goes to 7 on the x axis).

Step-by-step explanation:

First I find which graph as y -intercept of -3, which is all of them.

Next, I find with graph has a slope of 1/3. (rise 1 run 3). Only B and D has a slope of 1/3 (The ones that has a less steep graph. )

Then, I use the coordinate (0,0) to see which side the graph shades. I plug it into the inequality. (0)≥1/3(0)-3​. Solve. Is 0 greater than -3. YES! so we shade the part where (0,0) is shaded which is B.

6 0
3 years ago
Please please help will give brainlist
Alla [95]

Step-by-step explanation:

13  \frac{1}{8}

is the required answer

3 0
2 years ago
Other questions:
  • Zhang thinks that the value of a baseball card can be modeled by exponential decay and that the value will decrease at a rate of
    7·2 answers
  • The equation of the line of best fit of a scatter plot is y = −4x − 6. What is the slope of the equation?
    5·2 answers
  • Ross worked 43 hours in a certain week. He was paid $8.50 per hour and time and a half for all hours over 40. Determine his gros
    5·2 answers
  • Abel cycled a total distance of 2 and 1 over 2 miles during the months of March and April. If Abel only cycled 1 over 8 of a mil
    9·2 answers
  • For the parallelogram, find the value of the variables. Show your work
    10·1 answer
  • Select the correct answer.
    6·1 answer
  • What percent of 75 is 8?
    10·1 answer
  • Graph the system of inequalities y &gt; -3, y &lt; -|x+2|. Which two quadrants does the solution lie in?
    9·1 answer
  • Help help help help help me please
    6·1 answer
  • Karim's teacher gives him a book to read and one week to read it. The book has a
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!