Serial Monitor don't print any Value.

Hi? I wrote the code to print by using the functions in the serial monitor. And i was running this code.

int f(int n) {
     return 42+n;  // Note 'return' is a statement, not a function.  No "()" needed.
}

void setup()
{
  
}

void loop() {
   Serial.println(f(12));  // Displays "54" on Serial Monitor
   delay(5000);
}

But Serial Monitor did not print any Value.
So i was modify a this code. Like this.

void setup()
{
  
}

void loop() {
   Serial.println(54);  // Displays "54" on Serial Monitor
   delay(5000);
}

But Serial Monitor did not print any Value too.
How can i sovel this problem?

You forgot Serial.begin().

aarg:
You forgot Serial.begin().

I added the 'Serial.begin(1,1)'code. But But Serial Monitor can't print any Value.

chulwon0110:
I added the 'Serial.begin(1,1)'code. But Serial Monitor can't print any Value.

You seriously need to read the documentation on Serial. It's available from the IDE and on this website.

aarg:
You seriously need to read the documentation on Serial. It's available from the IDE and on this website.

aarg:
You seriously need to read the documentation on Serial. It's available from the IDE and on this website.

Oh... my mistake... Thank you!