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 18:10
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
question
Engineering, 04.07.2019 19:20
To design a steam turbine to produce 12,000 hp power. a engineer comsiders using a steady state stean low st 1160fr and engineer considers using a steady state steam flow at 1160°r and 450 psia to drive this steam turbine. the exhaust of the steam is cooled by the lake (vacuum). heat losing to the surroundings is measured at a rate of 555.55 btu/s. (a) sketch the system with the given conditions. (b) neglecting kinetic and potential energy changes from inlet to exit, determine the volumetric flow rate of the steam at the inlet, (ft'/hr). must clearly show unit conversions at crtical terms.
Answers: 1
question
Engineering, 06.07.2019 02:30
Precipitation hardening can be achieved in many light alloys by a three-step heat treatment. what is carried out and what is the purpose at each step? why is such a treatment necessary based on the nucleation and growth theory of phase transformation. compare this treatment with tempering martensite for carbon steels (similarities and differences).
Answers: 1
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
Mathematics, 01.12.2020 03:10
question
Business, 01.12.2020 03:10
question
History, 01.12.2020 03:20
Questions on the website: 13722361