//created by Dr. Ramsey
//demonstrate the use of cin.clear() and cin.ignore
//learn the use of && and ||
//learn to string together if and else into if else statements (elif in some languages)

#include <iostream>
#include <string>
using namespace std;

int main() {
  int i;
  cin >> i;
  if (cin.fail()) {
    cout << "Cin has failed" << endl;
    cin.clear(); // gets rid of the failure
    cin.ignore(10000,'\n'); //ignore the first n chars until we see a return
  }
  int j;
  cin >> j;
  cout << "j is " << j << endl;
  //
  int weight;
  cout << "Enter your weight: ";
  cin >> weight;
  if (weight < 0) {
    cout << "weight < 0" << endl;
    //weight = 0;
  }
  else if (weight > 4000) {
    cout << "weight > 4000" << endl;
  }
  else {
    cout << "weight was between 0 and 4000 " << endl;
  }

  int evilDragonHP;
  cout << "Give me the evil dragon's hp: ";
  cin >> evilDragonHP;
  if (evilDragonHP < 0 || evilDragonHP > 4000) {
    cout << "You entered wrong hps! Try again" << endl;
    cin >> evilDragonHP;
  }
  if (evilDragonHP >= 0 && evilDragonHP <= 4000) {
    cout << "Yay! You entered valid dragon hps!" << endl;
  }
  //if ( evil dragon hp was bad )
  // give some error message
  // if ( evil dragon hp was good)
  //give some positive message

  string firstName, lastName;
  cout << "enter your first and last name: ";
  cin >> firstName >> lastName;
  bool result = (firstName == "Doc");
  bool result2 = (firstName == "Spiderman");
  if (result || result2) {
    cout << "hello heroes" << endl;
  }
  else {
    cout << "welcome" << endl;
  }
  bool result3 = lastName == "Rams";
  if (result && result3) {
    cout << "hello professor" << endl;
  }
  //if ((firstName == "Doc") || (firstName = "Spiderman") || (firstName == "Ned")) {
  //cout << "hello heroes" << endl;
  //}

  if (lastName == "Stark") {
    cout << "Hello dire wolf" << endl;
  }
  else if (lastName == "Baratheon") {
    cout << "hello stag" << endl;
  }
  else if (lastName == "Lannister") {
    cout << "hello lion" << endl;
  }


}
