1. // Game Stats
  2. // Demonstrates declaring and initializing variables
  3.  
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. // Establishing variables and values
  10. int score = 72;
  11. double distance = 1200.76;
  12. char playAgain = 'y';
  13. bool shieldsUp = true;
  14. short lives = 3;
  15. short aliensKilled = 10;
  16. double engineTemp = 6572.89;
  17. int fuel;
  18.  
  19. // Printing information to screen
  20. cout << "\nScore: " << score << endl;
  21. cout << "Distance: " << distance << endl;
  22. cout << "Play Again?: " << playAgain << endl;
  23. cout << "Shields Up?: " << shieldsUp << endl;
  24. cout << "Lives: " << lives << endl;
  25. cout << "Aliens Killed: "<< aliensKilled << endl;
  26. cout << "Engine Temp: " << engineTemp << endl;
  27.  
  28. // Printing information and receiving information
  29. cout << "\nHow much fuel? ";
  30. cin >> fuel;
  31. cout << "Fuel: " << fuel << endl;
  32.  
  33. // Defining different types into user type
  34. typedef unsigned short int ushort;
  35. ushort bonus = 10;
  36. cout << "\nBonus: " << bonus << endl;
  37.  
  38. // Ending program
  39. return 0;
  40. }