Question: #include double maxValSeq (double,double,double); double maxValNest (double,double,double); void main() { double a,b,c; double max; a=3.4; b=-7.8; c=10.3; max=maxValSeq (a,b,c); printf(The maximum value found by maxValSeq


#include double maxValSeq (double,double,double); double maxValNest (double,double,double);
void main() { double a,b,c; double max;
a=3.4; b=-7.8; c=10.3; max=maxValSeq (a,b,c); printf("The maximum value found by maxValSeq is %.2f ",max); max=maxValNest(a,b,c); printf("The maximum value found by maxValNest is %.2f ",max);
} double maxValSeq(double x, double y,double z) { double max; max=x; if (y>max) max=y; if (z>max) max=z; return (max); } double maxValNest(double x, double y,double z) { double max; if (x>y) { if (x>z) max=x; else max=z; } else { if (y>z) max=y; else max=z;
} return (max); }
1tinclude double maxalSeq (double, double, double) double maxValNest (double, double, double) 5 void main) double a,b, c double max; 10 a=3.4: 12 c-10.3 14 15 16 max maxvalseq (a,b,c) print f("The maximum value found by maxvalseq is %.2f ",max); max-maxValNest (a,b,c) printf ("The maximum value found by maxValNest is .2fin", max) 19double maxvalseq (double x, double y. double z) 20 21 23 24 25 26 L 27 double maxvalNest (double x, double y, double z) double maxi max-x if (y>max) max=y ; if (z>max) max=z; return max) 29 30 double max: if (x>y) 32 if (x>z) max-x else rax z: 34 35 36 37 38 39 40 else if (y>z) max-y else max=z return max); 42 (a) (10 points) The following programming model contains in its code memory the indicated C program composed of 3 functions: the main function and two functions that finds the maximum of 3 numbers (each which uses branching, if, instructions differently). You will be showing how the working memory is used during the execution of each function. Show how the variables are organized in the working memory for each function. Show the values are assigned to the variables. Be sure to show all values that are assigned and replaced. Record successive assignments to variables/parameters as follows (the? indicates and unknown value) Variable name 2.6,A, 10 Using arrows show how values are copied between the working memories allocated to the functions. In the console window show the output of the program. Code Memory Working Memory -10.3 //Th 4x value tasaa waiu.a pristf("Th4 "laum waiua wound by waaVaill..t &a .zrin. doubleaN function that tiada th. Bannum walua uang bkatad 12' double aK Console CPU