// gameStats.cpp // Example program to demonstrate // - various C++ variable types // - basic input/output #include using namespace std; int main() { int score; double distance; char playAgain; bool shieldsUp; short lives, aliensKilled; score = 0; distance = 1200.76; playAgain = 'y'; shieldsUp = true; lives = 3; aliensKilled = 10; double engineTemp = 6572.89; cout << "\nscore: " << score; cout << "\ndistance: " << distance; cout << "\nplayAgain: " << playAgain; // skipping shieldsUp --- bools typically are not output // add it in if you want to see what it does... // ... might be worth knowing... cout << "\nlives: " << lives; cout << "\naliensKilled: " << aliensKilled; cout << "\nengineTemp: " << engineTemp; int fuel; cout << "\n\nHow much fuel? --> "; cin >> fuel; cout << "\nFuel set to: " << fuel; typedef unsigned short int uShort; uShort bonus = 10; cout << "\n\nbonus: " << bonus << endl; return 0; }