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
MariettaO [177]
3 years ago
8

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:
ValentinkaMS [17]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:"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"
"values[p1] = values[p2]"this line goes to the list "values" and takes value that is at position "p2" and stores it into variable that is at position "p1"
"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
You might be interested in
The wheels on A bike have a radius of 8.5 inches. If the wheels make 15 complete rotations, how far does the bike travel?
statuscvo [17]

Hello!

\large\boxed{\text{D = 255pi in or 800.7 in}}

Solve for the distance by solving for the circumference of the wheels:

C = 2rπ

C = 2(8.5)(π)

C = 17π

The wheels make 15 rotations, so multiply the circumference by 15:

17π × 15 = 255π or ≈ 800.7 inches

7 0
3 years ago
fermium-253 has a half-life of three days. a sample contains 400 g. how long will it take for the sample to decay to 100 g?
sladkih [1.3K]
This is a relatively easy half life calculation.
After one half-life period, half of the isotope remains.
After two half-life periods, one quarter of the isotope remains.
That being the case, we see this will take 2 half-life periods or 6 days.


6 0
3 years ago
Read 2 more answers
Which expressions are equal to 0 when x = -1? Check all that apply.
Sphinxa [80]

Answer:

A C and E

Step-by-step explanation:

6 0
3 years ago
If I=square root-1 then i^2=
MrRissso [65]

Answer:

i^−3 = i

i^−2 = −1

i^−1 = −i

i^0 = 1

i^1 = i

i^2 = −1

i^3 = −i

i^4 = 1

i^5 = i

i^ 6 = −1

See the pattern

7 0
3 years ago
Picture attached please help
bogdanovich [222]

Answer:

D

Step-by-step explanation:

red blood cell = 0.000009 = 9 × 10^{-5}

cold virus = 0.0000003 = 3 × 10^{-7}

Divide diameter of red blood cell by diameter of cold virus

\frac{9(10^-5)}{3(10^-7 )}

= 3 × 10^{-5-(-7)}

= 3 10^{-5+7}

= 3 × 10² → D

5 0
3 years ago
Other questions:
  • Help on these three questions social security is 6.2% and Medicare is 1.45%
    10·1 answer
  • What is 18/90 is simplest form
    7·1 answer
  • if the length of a rectangle is 2km less then 3times the width and the perimeter is 68 what is the length
    6·1 answer
  • Could someone answer this for me please? Thank you!
    8·1 answer
  • What is -4^2?<br><br> thanks!
    13·2 answers
  • So my question would be related to math based on Turing this equation of scientific notation back to a regular notation
    6·1 answer
  • 2.
    7·1 answer
  • Exercise 2
    9·1 answer
  • Which of the models show 1.28 ÷ 4?
    13·1 answer
  • The calling convention should be such that every function is caller-independent. What does that mean
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!