C++ Coding Question, Fill the void function *n1, int *n2, int *n3) void passReference(int ( // Write your code here } Rounding to nearest 10 and rotating once clockwise In this coding exercise, you are asked to write the body of a function called passReference, which takes three integers by reference, round off each number to the nearest 10, and then right rotate all the numbers clockwise only once. For example, if variables a, b, and c contains the following values: a = 214; D=2147; == 214748; Then values of variables after calling the passReference(&a, &b, &c) will be: a = 214750 210

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
C++ Coding Question, Fill the void function
*n1, int *n2, int *n3)
void passReference(int
{
// Write your code here
}
Rounding to nearest 10 and rotating once clockwise
In this coding exercise, you are asked to write the body of a function called passReference, which
takes three integers by reference, round off each number to the nearest 10, and then right rotate all
the numbers clockwise only once.
For example, if variables a, b, and c contains the following values:
a = 214;
b = 2147;
c=214748;
Then values of variables after calling the passReference(&a, &b, &c) will be:
a = 214750
b = 210
c=2150
Sample inputs
214,2147,214748
10,20,30
0,2,3
5,9,13
2147483641,2147483635,2147483631
Sample outputs
214750,210,2150
0,10,20
0,0,0
10,0,10
2147483630,2147483640,2147483630
Transcribed Image Text:C++ Coding Question, Fill the void function *n1, int *n2, int *n3) void passReference(int { // Write your code here } Rounding to nearest 10 and rotating once clockwise In this coding exercise, you are asked to write the body of a function called passReference, which takes three integers by reference, round off each number to the nearest 10, and then right rotate all the numbers clockwise only once. For example, if variables a, b, and c contains the following values: a = 214; b = 2147; c=214748; Then values of variables after calling the passReference(&a, &b, &c) will be: a = 214750 b = 210 c=2150 Sample inputs 214,2147,214748 10,20,30 0,2,3 5,9,13 2147483641,2147483635,2147483631 Sample outputs 214750,210,2150 0,10,20 0,0,0 10,0,10 2147483630,2147483640,2147483630
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY