Unless the both are zero \'t w? 37. (6 points ) Given the following table of Tim
ID: 3738745 • Letter: U
Question
Unless the both are zero 't w? 37. (6 points ) Given the following table of Time in days vs number of students still in a class. Use a linear interpolation formula to get the number students left on day 17? Show all work. 0 40 10 32 20 19 30 8 40 1 38. (6 PTS) Consider this program segment: Trace all variables (Memory snapshots) along with showing any output at the appropriate points in the execution (USE A TABLE WITH OUPUT I Is a must here). int A, B: A 10; B 1; For (i-1; ie4++1) if(A>B) A A B 2; else A#A/2; ? ?-3"?-1;Explanation / Answer
if(A > B)
{
A = A * B + 2;//12
B++;//2
}
if(A > B)
{
A = A * B + 2;//12
B++;//3
}
else
{
a = a/2; //1
b = b + 4 ;//7
}
else
{
a = a/2; //-10
b = b + 4 ;//11
}
The output is:
A=12 B=2
A=12 B=3
A=1 B=7
A=-10 B=11
if(A > B)
{
A = A * B + 2;//12
B++;//2
}
12 2 0 prints as "A" = 12 "B" = 2 and compute A = A -3*B -1;//5 5 2 0if(A > B)
{
A = A * B + 2;//12
B++;//3
}
12 3 1 prints as "A" = 12 "B" = 3 and compute A = A -3*B -1; //2 2 3 1else
{
a = a/2; //1
b = b + 4 ;//7
}
1 4 2 prints as "A" = 1 "B" = 7 and compute A = A -3*B -1; //-21 -21 7 2else
{
a = a/2; //-10
b = b + 4 ;//11
}
-10 11 3 prints as "A" = 1 "B" = 11 and compute A = A -3*B -1; // -55 -10 11 3Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.