diff --git a/examples/HBdayEC b/examples/HBdayEC new file mode 100644 index 0000000..5d14094 --- /dev/null +++ b/examples/HBdayEC @@ -0,0 +1,21 @@ +#include +#include +#include + +using namespace std; + +void slowPrint(unsigned long speed, const char *t) { + int x = 0; + while(t[x]!=0) { + cout << t[x++]; + cout.flush(); + usleep(speed); + } +} + +int main() { + slowPrint(2000, "Wish you a very happy birthday!!!\n"); + slowPrint(2000, "Wish you a very happy birthday!!!\n"); + slowPrint(300000, "MAY YOU HAVE A BLEESED DAY AHEAD!!!!"); + return 0; +} diff --git a/examples/HappyBirthday.cpp b/examples/HappyBirthday.cpp new file mode 100644 index 0000000..fc26872 --- /dev/null +++ b/examples/HappyBirthday.cpp @@ -0,0 +1,19 @@ +#include +#include +#include +using namespace std; + +void slowPrint(unsigned long speed, const char *t) { + int x = 0; + while(t[x]!=0) { + cout << t[x++]; + cout.flush(); + usleep(speed); + } +} + +int main() { + slowPrint(100000, "HAPPY BIRTHDAY TO YOU!\n"); + slowPrint(5000, "MAY YOU HAVE A WONDERFUL DAY!!!!"); + return 0; +} \ No newline at end of file diff --git a/examples/HappyBirthday123.cpp b/examples/HappyBirthday123.cpp new file mode 100644 index 0000000..251beae --- /dev/null +++ b/examples/HappyBirthday123.cpp @@ -0,0 +1,19 @@ +#include +#include +#include +using namespace std; + +void slowPrint(unsigned long speed, const char *t) { + int x = 0; + while(t[x]!=0) { + cout << t[x++]; + cout.flush(); + usleep(speed); + } +} + +int main() { + slowPrint(100000, "HAPPY BIRTHDAY TO YOU!\n"); + slowPrint(5000, "MAY YOU HAVE A WONDERFUL DAY!!!!"); + return 0; +}