Hi,
Here's my code:
#include <iostream.h>
int main ()
{
int i;
cout << "Please enter a number" << endl;
cin >> i;
if (i < 0)
{ cout << "The number you entered is negative.\n";}
if (i = 0)
{ cout << "The number you entered is zero.\n";}
if (i > 0)
{ cout << "The number you entered is positive.\n";}
else
{ cout << "Thank you for using this program.\n";}
return 0;
}
I just want to have the program print if the number is 0, negative or positive. The code works with no errors but all it does is ask for a number, and when you hit enter it says Thanks...What am I doing wrong? I've been on this for 2 hours! HELP.