so whay this short program doesnt print the variable in the serial?

i dont understand why this doesnt show anything

int x=30;

void setup(){

}
void loop(){

Serial.print(x);
}

why it doesnt print 30 in the serial?

void setup(){

}

Hum

void setup()
{
Serial.begin(9600); //set the serial transfer rate. Serial Monitor at a data rate of 9600 bits per second.
}

Why didn't you first use the Serial.begin(9600); function?

Use this code -

int x = 30;

void setup(){
Serial.begin(9600);
}

void loop(){
Serial.print(x);
}

(deleted)

Yep - First time posters you can perhaps make allowances for, but for someone with 60 posts...

Like this...
[​code]//some code here[​/code]

When posted on the forum appear like this...

//some code here

There's even the </> button on the toolbar to insert the tags automatically for you...

Perhaps the forum should disallow posts containing {} unless they are inside code tags. Bring up a warning instead "Did you mean to use code tags?".