Here is the code so far
Code:
// List Middle Value Integer Out of Three ; Mary Pat Rhodes; Jan. 17, 2008; 1:54 PM
//
#include <iostream> // allows
using std::cout;
using std::cin;
using std::endl;
int main ()
{
int number1, number2, number3, middle;
cout << "Enter three numbers.\n";
cout << "First: ";
cin >> number1;
cout << "\nSecond: ";
cin >> number2;
cout << "\nThird: ";
cin >> number3;
cout << "\n";
if (number1 > number2)
if (number1 < number3)
middle = number1;
if (number1 < number2)
if(number2 < number3)
middle = number2;
if (number1 < number3)
if(number3 < number2)
middle = number3;
cout << "Middle: " << middle;
cout << "\n";
return 0;
}
But i getting a debugging error that has me really baffled!
Code:
'Rhod_2a.exe': Loaded 'C:\Documents and Settings\Mary Pat Rhodes.YOUR-JZ14F3VB7A\My Documents\Visual Studio 2005\Projects\Rhod_2a\debug\Rhod_2a.exe', Symbols loaded.
'Rhod_2a.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'Rhod_2a.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'Rhod_2a.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', No symbols loaded.
'Rhod_2a.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', No symbols loaded.
'Rhod_2a.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
Run-Time Check Failure #3 - The variable 'middle' is being used without being defined.
The program '[3584] Rhod_2a.exe: Native' has exited with code 0 (0x0).
Where, what, how do I clear this error??
Thanks again for all your patience and kindness.
Cheers,
MP