Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Define stubs for the functions called by the below main(). Each stub should prin

ID: 3827895 • Letter: D

Question

Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a newline, and should return -1. Example output:

c++

_________________________________________

#include <iostream>
using namespace std;

/* Your solution goes here */

int main() {
int userNum1 = 0;
int userNum2 = 0;
int avgResult = 0;

userNum1 = GetUserNum();
userNum2 = GetUserNum();

avgResult = ComputeAvg(userNum1, userNum2);

cout << "Avg: " << avgResult << endl;

return 0;
}

Explanation / Answer

#include <iostream>
using namespace std;
int GetUserNum()
{
cout <<"FIXME: Finish GetUserNum()" << endl;
return -1;
}

int ComputeAvg(int n1, int n2)
{
cout <<"FIXME: Finish ComputeAvg()" << endl;
return -1;
}

int main() {
int userNum1 = 0;
int userNum2 = 0;
int avgResult = 0;
userNum1 = GetUserNum();
userNum2 = GetUserNum();
avgResult = ComputeAvg(userNum1, userNum2);
cout << "Avg: " << avgResult << endl;
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote