Question: Please write in C++ Write a function void sum (int num1, int num2, int diff, int prod) which finds the sum and difference of num1
Please write in C++
Write a function void sum (int num1, int num2, int diff, int prod) which finds the sum and difference of num1 and num2. If any of the parameters should be reference parameters, modify the heading appropriately. void sum (int num1, int num2, int diff, int prod) {
} Write a function void sum (int n) which reads n numbers and prints the sum of the numbers.
void sum (int n) {
}
Write a value-return function which accepts the cost of an item (price) and the amount paid by a customer (amount_paid) as parameters. The function must calculate the amount of change the customer is owed and return that value.
double change (double price, double amountPaid) {
}
Write a void function which accepts two integers (a and b) as parameters and does at least one of the following based on the values of a and b : prints "The numbers are equal" if a and b are equal, prints "a is greater than b" if a is greater than b, or prints "b is greater than a" if b is greater than a.
void evaluateNumbers (int a, int b) {
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
