Trade in your breakfast
Posted: Wed Feb 18, 2009 3:12 am
Just a lighthearted, windows-dependent toy console program I thought I'd share :) Dunno if anyone remembers the old Dannon Frusion Smoothie commercials.
Used to have the equivalent of this on my calculator (except it actually drew circles and lines :D). Threw this together in like 5 minutes 'cause my fiancee was remembering it, and I've misplaced my graphing calc for the moment.
Used to have the equivalent of this on my calculator (except it actually drew circles and lines :D). Threw this together in like 5 minutes 'cause my fiancee was remembering it, and I've misplaced my graphing calc for the moment.
Code: Select all
#include <iostream>
#include <string>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
using namespace std;
int main() {
string a =
" __________________ \n"; a +=
" / Trade in your /\n"; a +=
" / \n"; a +=
" O \n"; a +=
" ,-|-[] \n"; a +=
" / .| \n"; a +=
" / \\ \n";
string b =
" __________________ \n"; b +=
" / breakfast for / \n"; b +=
" / \n"; b +=
" \\ O [] \n"; b +=
" `-|-+ \n"; b +=
" |. \n"; b +=
" / \\ \n";
string c =
" __________________ \n"; c +=
" / this Dannon / \n"; c +=
" / \n"; c +=
" O \n"; c +=
" ,-|-[] \n"; c +=
" / .| \n"; c +=
" / \\ \n";
string d =
" __________________ \n"; d +=
" / Frusion Smoothie / \n"; d +=
" / \n"; d +=
" \\ O [] \n"; d +=
" `-|-+ \n"; d +=
" |. \n"; d +=
" / \\ \n";
string e =
" __________________ \n"; e +=
" / / \n"; e +=
" / \n"; e +=
" O \n"; e +=
" --|-[] \n"; e +=
" | \n"; e +=
" / \\ \n";
string *anim[] = {&a, &b, &c, &d, &e};
for (size_t i = 0;GetAsyncKeyState(VK_SPACE) == 0;i++) {
system("cls");
i %= 5;
cout << *anim[i];
Sleep(750);
}
return 0;
}