The following program asks the user to enter two numbers. What is the output of the program if the user enters 12 and 14? #include using namespace std; void func1(int &, int &); void func2(int &, int &, int &); void func3(int, int, int); int main() { int x = 0, y = 0, z = 0; cout << x << " " << y << " " << z << endl; func1(x, y); cout << x << " " << y << " " << z << endl; func2(x, y, z); cout << x << " " << y << " " << z << endl; func3(x, y, z); cout << x << " " << y <<" " << z << endl; return 0; } void func1(int &a, int &b) { cout << "Enter two numbers: "; cin >> a >> b; } void func2(int &a, int &b, int &c) { b++; c−−; a = b + c; } void func3(int a, int b, int c) { a = b − c; }
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
The following
#include <iostream>
using namespace std;
void func1(int &, int &);
void func2(int &, int &, int &);
void func3(int, int, int);
int main()
{
int x = 0, y = 0, z = 0;
cout << x << " " << y << " " << z << endl;
func1(x, y);
cout << x << " " << y << " " << z << endl;
func2(x, y, z);
cout << x << " " << y << " " << z << endl;
func3(x, y, z);
cout << x << " " << y <<" " << z << endl;
return 0;
}
void func1(int &a, int &b)
{
cout << "Enter two numbers: ";
cin >> a >> b;
}
void func2(int &a, int &b, int &c)
{
b++;
c−−;
a = b + c;
}
void func3(int a, int b, int c)
{
a = b − c;
}

Trending now
This is a popular solution!
Step by step
Solved in 2 steps









