Problem with my Program.... Please Help

#include <iostream>
using namespace std;
void main()
{
int length, width;
int perimeter, area;
cout << "Length = ";
cin >> length;
cout << "Width = ";
cin >> width;
perimeter = 2*(length+width);
area = length*width;
cout << endl
<< "Perimeter is " << perimeter;
cout << endl
<< "Area is " << area
<< endl;
}
Read the compilation error.
main must return int
Pretty self-explanatory.
Wow... i feel stupid right now.. i didnt even bother looking at the compilation error .... thanks bro i fixed it.. it was int main()
Topic archived. No new replies allowed.