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
Marat540 [252]
3 years ago
14

Given three function parameters p1, p2, p3, rotate the values to the right. Rotate means to shift each item to the item on the r

ight, with the rightmost item rotating around to become the leftmost item. If initial values are 2 4 6, final values are 6 2 4. Hints:
Required:
Declare the function's three parameters as reference type. Function return type is void.
Computers and Technology
2 answers:
erica [24]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

void RotateRight3( int& p1, int& p2, int& p3)   {

     int = tmp;

     tmp = p3;    

     p3 = p2;        

     p2 = p1;      

     p1 = tmp;    

}

int main()   {

     int n1, n2, n3;

     cin >> n1;      

     cin >> n2;

     cin >> n3;

     RotateRight3(n1, n2, n3);

           cout << n1 << " " << n2 << " " << n3 << end1;

     return 0;

}

inna [77]3 years ago
5 0

Answer:

void RotateRight3( int& p1, int& p2, int& p3)   {

    int = tmp;

    tmp = p3;    

    p3 = p2;        

    p2 = p1;      

    p1 = tmp;    

}

You might be interested in
The ____ method returns an integer that represents the location of the substring within the string.
enot [183]

Insert Method

it is used to returns an integer that speaks to the area of the substring inside the string.

5 0
4 years ago
Vadik is creating a program where the user inputs their grade level and the program tells them which sports teams they are allow
Lelechka [254]
He should use if, elif, else
4 0
3 years ago
Read 2 more answers
Select all that apply. To select more than one worksheet at the same time, which of the following keys on your keyboard can you
Colt1911 [192]
<em>Shift </em>selects multiple worksheets at the same time. <em>Ctrl</em> selects all that you selected with Ctrl pressed.
4 0
4 years ago
Which of the following statements are true?
grin007 [14]

Answer:

I think the answer are two which are B and C

7 0
4 years ago
In C, a switch construct can have ________ number of default case(s). *
azamat

I think so that it will be zero or more

7 0
3 years ago
Other questions:
  • 1.6.6 Night out for codehs
    6·1 answer
  • Which type of wireless network is<br> controlled through a wireless<br> access point?
    7·1 answer
  • Troubleshooting a printer that does not work includes a. connecting the printer to your computer b. checking to see if there is
    13·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • What are the ethical implications of online social media after someone has died
    8·2 answers
  • Write an assembly program that will prompt the user for 3 inputs (let’s abstractly call them a, b, and c) without a leading stri
    13·1 answer
  • What is lasso tool write the name of any modelling and animation software<br>​
    8·1 answer
  • Why 3 phase motors so effective?
    5·1 answer
  • How to add more then one picture on a brainy question really need this
    8·1 answer
  • Please do this now
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!