// Zombie mower by Dopefish
#include <iostream>
#include <iodos.h>
#include <conio.h>
using namespace std;
int main()
{
dos_console();
int zombies = 1;
cout << "How many do you see standing on the lawn?" << endl << "> ";
cin >> zombies;
while (zombies > 0)
{
cout << zombies << " zombies left under the moon" << endl;
cout << zombies << " zombies is going to be mown" << endl;
cout << "If one of em' happens to be mown," << endl;
zombies--;
cout << "then it's only " << zombies << " left on the lawn" << endl << endl;
}
if (zombies < 1)
{
cout << zombies << " zombies left under the moon" << endl;
cout << zombies << " zombies is going to be mown" << endl;
cout << "There are no more zombies left to mown..." << endl;
}
getch();
return(0);
}
Saturday, October 23, 2010
Coding Skill +1 (Zombie mower in C++)
Found some code I did over half a decade ago :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment