Can't figure out what is wrong with my code

.The user will input an integer. If the integer is less than 0, print out the less than operator "<".

If it is greater than 0, print out the greater than operator ">".

If it is equal to 0, print out the equality operator "=="

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <string>
using namespace std;

int main ()
{
    double integer;
    //cout << "";
    //cin >> "";
    
    if ( integer < 0)
    {
        cout << '<';
    }
    
    else if ( integer < 0)
    {
        cout << '>';
    }
     
    else
        
        cout << "==";
        
    system("pause");
    return 0;
}
The user will input an integer
double integer;

You also haven't asked the user to input a number.
http://www.cplusplus.com/doc/tutorial/basic_io/
Thank you! That helped.
Topic archived. No new replies allowed.