Hi, I need help with this C++ programming problem about functions. Define stubs
ID: 3768218 • Letter: H
Question
Hi, I need help with this C++ programming problem about functions.
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:
And here is the template for the problem, please use it. However, the only thing you need to do is to add your codes in the line that says Your solution goes here:
#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;
}
Please explain why you choose your codes as well. Thanks!
Explanation / Answer
int GetUserNum()
{
cout<<"FIXME: Finish GetUserNum()"<<endl;
return -1;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.