subject
Engineering, 24.03.2020 04:53 sakinahunt

Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in an expression.

#include

double FindMax(double num1, double num2) {

double maxVal = 0.0;

// Note: if-else statements need not be understood to complete this activity

if (num1 > num2) { // if num1 is greater than num2,

maxVal = num1; // then num1 is the maxVal.

}

else { // Otherwise,

maxVal = num2; // num2 is the maxVal.

}

return maxVal;

}

int main(void) {

double numA = 5.0;

double numB = 10.0;

double numY = 3.0;

double numZ = 7.0;

double maxSum = 0.0;

/* Your solution goes here */

printf("maxSum is: %.2f\n", maxSum);

return 0;

}

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 19:10
What is the main objective of using reheat rankine cycle?
Answers: 3
question
Engineering, 04.07.2019 19:10
Asteel wire of 2 mm diameter is fixed between two points located 2 m apart. the tensile force in the wire is 250n, if its density of steel is given by 7830 kg/m3 the fundamental frequency of vibration hz? ?
Answers: 3
question
Engineering, 04.07.2019 19:20
Apure substance is a)-mixture of various chemical elements or compounds b)-substance that has a fixed chemical composition throughout c)-mixture that is homogeneous (such as air) d)-all the answers
Answers: 3
question
Engineering, 04.07.2019 19:20
Determine the stoichiometric and actual air-fuel ratios and the mole flue gas composition for combustion with 15% excess air for raw indiana, pennsylvania raw coal.
Answers: 3
You know the right answer?
Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint:...
Questions
question
History, 10.09.2021 14:30
question
Mathematics, 10.09.2021 14:30
question
English, 10.09.2021 14:30
question
Chemistry, 10.09.2021 14:30
question
English, 10.09.2021 14:30
question
History, 10.09.2021 14:30
Questions on the website: 13722367