fork(26) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. /* Your solution goes here */
  5. int GetUserNum (int userNum1, int userNum2) {
  6. cout << "FIXME: Finish GetUserNum()" << endl;
  7.  
  8. return userNum1, userNum2;
  9. }
  10.  
  11. int main() {
  12. int userNum1 = 0;
  13. int userNum2 = 0;
  14. int avgResult = 0;
  15.  
  16. userNum1 = GetUserNum();
  17. userNum2 = GetUserNum();
  18.  
  19. avgResult = ComputeAvg(userNum1, userNum2);
  20.  
  21. cout << "Avg: " << avgResult << endl;
  22.  
  23. return 0;
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:16:26: error: too few arguments to function 'int GetUserNum(int, int)'
    userNum1 = GetUserNum();
                          ^
prog.cpp:5:5: note: declared here
 int GetUserNum (int userNum1, int userNum2) {
     ^
prog.cpp:17:26: error: too few arguments to function 'int GetUserNum(int, int)'
    userNum2 = GetUserNum();
                          ^
prog.cpp:5:5: note: declared here
 int GetUserNum (int userNum1, int userNum2) {
     ^
prog.cpp:19:45: error: 'ComputeAvg' was not declared in this scope
    avgResult = ComputeAvg(userNum1, userNum2);
                                             ^
stdout
Standard output is empty