Why wont this run?

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
28
29
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main()
{


int numberOne;
cout << "enter first number";
cin >> numberOne;

int numberTwo;
cout << "enter second number";
cin >> numberTwo;

if (numberOne > numberTwo)
{
    cout << "first number is greater than number two"
    << endl;
}
else
{
    cout << "number one is not greater than number two"
    << endl;
}
}
return 0;

ive tried this over and over to try to figre out what is missing?
error expected unqualified-id before 'return'
The return statement should be inside the closing bracket for int main().

for example:

1
2
3
4
5
6
7
8
9
10
11
12
int main()
{
    //code omitted for brevity

    else
    {
        cout << "number one is not greater than number two"
        << endl;
    }

    return 0;
}


I hope this helps.
yes thanks
Topic archived. No new replies allowed.