Create a function that logs messages from firmware.
The function must accept:
If the timestamp flag is:
false → print only the messagetrue → print a simulated timestamp followed by the messageUse a fixed timestamp value of 123456 for this exercise.
The final printed format must be:
Without timestamp:
messageWith timestamp:
[123456] message
In main():
0 → call the function using only the message (default behavior)1 → call the function with timestamp enabled (true)
Example 1
Input:
0 HelloOutput:
Hello
Example 2
Input:
1 AlertOutput:
[123456] Alert
Constraints:
Input
0 Hello
Expected Output
Hello