#include
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
int tng = getch();
int w = 119, s = 115, a = 97, d = 100, esc = 27; //tecknenas ascii-värden.
while(tng != esc)
{
if (tng == w)
{
cout << "\\O/\n |\n/ \\";
}
else if (tng == s)
{
cout << " O\n/|\\\n/ \\";
}
else if (tng == a)
{
cout << "\\O\n |\\\n//";
}
else if (tng == d)
{
cout << " O/\n/|\n \\\\";
}
else
{
cout << "Fel inmatning.";
}
tng = getch();
system("CLS");
}
system("PAUSE");
return EXIT_SUCCESS;
}