How to write a C Program Cross Platform - Clear and Sleep ?
#include
#ifdef __unix__
# include
#define clear() system("clear");
#elif defined _WIN32
# include
#define sleep(x) Sleep(1000 * x)
#define clear() system("cls");
#endif
int main(){
char name[20];
clear();
printf("Hello World\n");
sleep(2);
clear();
printf("Please Enter You Name: ");
fgets(name,sizeof(name),stdin);
sleep(2);
clear();
printf("Hello %s", name);
sleep(2);