simple help needed !

im getting this error but i do not know why
:\users\y410p\desktop\c++ programs\labex1.1\lol.cpp(14): error C2447: '{' : missing function header (old-style formal list?)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
using namespace std;

int main()
{

    int Weight, Height;
    cout << "Enter Weight: ";
    cin >> Weight;
    cout << "Enter Height: ";
    cin >> Height;
}

{    cout << "Weight" << "\t\t" << "Height" << endl;
    cout << "End Of Program" << endl;
    system("pause");
	    return 0;
}

Line 12 and line 14 have brackets where they shouldn't be.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
using namespace std;

int main()
{

	int Weight, Height;
	cout << "Enter Weight: ";
	cin >> Weight;
	cout << "Enter Height: ";
	cin >> Height;
	cout << "Weight" << "\t\t" << "Height" << endl;
	cout << "End Of Program" << endl;
	system("pause");
	return 0;
}
Topic archived. No new replies allowed.