Give solution in C ++ Language with secreenshoot of source code. Part 1 Write a function that inputs two integers in main() function and passes the integers to a function by reference. The function...


Give solution in C ++ Language with secreenshoot of source code.


Part 1


Write a function that inputs two integers in main() function and passes the integers to a function by reference. The function swaps the value. The main() function should display the values before and after swapping.
Temp= Variable A;
Variable A= Variable B; Variable B= Temp
Part 2
Write a function that takes an integer n as parameter and returns the sum of its digits. For example, the program should display 9 if the user enters 135.





Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here