Write a Go program to demonstrate the use of time.Ticker to execute a task periodically.
MediumProblem Statement
Write a Go program to demonstrate the use of time.Ticker to execute a task periodically.
Sample Input
A ticker interval of 1 second.
Sample Output
Task executed Task executed Task executed Task executed Task executed
Limits
Time: 2s · Memory: 256 MB