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
its was taylor's 8th birthday and there were 47 presents. Each kid brought 10 presents, except for three kids who brought five p
goblinko [34]
47 - 5*3 - 2*1 = 30. 30/3 = 3, so add three plus five plus two = 10 kids
4 0
3 years ago
How to solve 5(x+10) + 2x
sveta [45]

Expand

5x+50+2x5x+50+2x

Collect like terms

(5x+2x)+50(5x+2x)+50

Simplify

The answer is 7x+50

6 0
4 years ago
An office administrator earns $16 an hour, and she works 48 hours a week. What is her weekly wage?
Dvinal [7]
If she works 48 hours per week and she earns 16 dollars per hour, we can find the weekly wage by multiplying 48 by 16. This gets us a weekly wage of $768 (Choice A).

:)
7 0
3 years ago
Read 2 more answers
Question 2 of 10
lana66690 [7]

Answer:

O_O UHMM I think B and C.. and A

5 0
3 years ago
Read 2 more answers
you are in charge of buying flowers for the flower beds around your school you cannot spend over $80 on flowers the flowers cost
Elena-2011 [213]
You can buy 7 flats of flowers. this is because 10.99 is close to 11.00, and 7 x 11 is 77. and you cant do 77 + 11 to get less then 80.

the answer: 7 flats of flowers

hope it helps :)
4 0
3 years ago
Other questions:
  • A sandwich shop has 30 stores and 60% of the stores are in California. The rest of the stores are in Nevada. How many stores are
    7·1 answer
  • 11.717, 11.771, 11.117, 11.171 greatest to least
    15·1 answer
  • How many solutions does the system below have?
    7·1 answer
  • ANSWER THIS QUICK!! IT¨S WORTH 46 POINTS
    15·1 answer
  • Choose the correct answer to complete the sentence.
    9·1 answer
  • Give two numbers that multiply together to give you a number greater than 10
    9·2 answers
  • A plumber charges $25 for a service call plus $50 per hour of service. Write an equation in slope-intercept form for the cost, C
    10·1 answer
  • PLZ HELP ME ITS DUE RIGHT NOW
    10·1 answer
  • Rodrigo traveled at an average speed of 55 miles per hour for 5 hours to get from one national park to the next on his vacation.
    14·1 answer
  • Help me with this pls
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!