Global Scope example

I am trying to write code
#include
using namespace std;

int x =100;

int main () {

 cout << x << endL;

return 0;
}

it is not working. But when i remove endL it starts working. whats the reason as you said we have to write endL