In: Computer Science
Write a program which alternately prints "Hello, world!" and "Buy Coca-Cola!" for fixed intervals, between screen clears, indefinitely. The "Buy Coca-Cola" message should be below the liminal threshold (the user not be able to consciously perceive it), which is about 200ms. Call this blink.cpp. must be in c++

====================================================


====================================================
//Define all header files
#include <iostream>
#include <stdlib.h>
#ifdef WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif // win32
using namespace std;
//sleep function to sleep for specified number of
milliseconds
void sleep(int milliseconds)
{
//Check for system of WIN32 bit
#ifdef WIN32
Sleep(milliseconds);
//Calling Sleep mehtod for specified milliseconds in WIN32
method
#else
usleep(milliseconds * 1000);
//Calling usleep method for specified milliseconds in WIN32
method
#endif // win32
}
//main method
int main()
{
//Print Hello, world! on screen
cout<<"Hello, world!"<<endl;
//Sleepf ro 200 milliseconds
sleep(200);
//Print Buy Coca-Cola! on screen
cout<<"Buy Coca-Cola!"<<endl;
//Clear screen before it go for next
execution
system("cls");
//Calling main method again for calling
indefinitely
main();
}