+ 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; }

18th Aug 2017, 12:14 PM
Yudi Romiyansa
Yudi Romiyansa - avatar
3 Answers
+ 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; }
17th Apr 2019, 8:52 AM
RAHUL VATS
RAHUL VATS - avatar
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;
17th Sep 2020, 3:49 AM
OjeifoIduma
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; }
25th Nov 2021, 1:36 PM
Matlabxonov Sulaymonxon