QUESTION
Define a function FindHighestNum() with no parameters that reads integers from input until a negative integer is read. The function returns the largest of the integers read.
Ex: If the input is 35 75 65 -50 60, then the output is:
75
Code:
#include <iostream>
using namespace std;
/* Your code goes here */
int main() {
int maxVal;
maxVal = FindHighestNum();
cout << maxVal << endl;
return 0;
}
Related Questions