123456789101112131415161718192021222324252627282930313233343536373839
#include <iostream> #include <ctime> #include <cstdlib> using namespace std; void welcome(); void goodbye(); int guess(); int main() { int num; welcome(); guess(); cout << guess << endl; goodbye(); system("pause"); return 0; } void welcome() { cout <<"welcome to the guessing game" << endl; } void goodbye() { cout << "thanks for playing" << endl; } int guess() { int num; cout << "enter a number between 1 & 100" << endl; cin >> num; return num; }
cout << guess << endl;
cout << guess() << endl;
12
int returnedValue = guess(); cout << returnedValue << endl;