+ 2
Help Me?
Type in a code to declare a function sum, taking three parameters of the type double and returning their sum. Declare three variables a, b, and c in the main and pass them to the 'sum' function. double sum(double x, y, double z) { return x + y + ; } int main() { double a = 1.2; double b = 2.3; double c = 3.4; cout << (a, b, c); return 0; }
3 Réponses
+ 5
double sum(double x,
double
y, double z)
{
return x + y +
z
;
}
int main()
{
double a = 1.2;
double b = 2.3;
double c = 3.4;
cout <<
sum
(a, b, c);
return 0;
}
0
Type in a code to declare a function sum, taking three parameters of the type double and returning their sum. Declare three variables a, b, and c in the main and pass them to the 'sum' function.
Answer:
double sum(double x,
y, double z)
{
return x + y + z
;
}
int main()
{
double a = 1.2;
double b = 2.3;
double c = 3.4;
cout << sum
(a, b, c);
return 0;
0
double sum(double x,
double
y, double z)
{
return x + y +
z
;
}
int main()
{
double a = 1.2;
double b = 2.3;
double c = 3.4;
cout <<
sum
(a, b, c);
return 0;
}