
#include <iostream>
#include<string>
using namespace std;
int main() {
  cout << "Exam questions!" << endl;
  int problem = 1;
  cout << "--" << problem++ << "--" << endl;
  //int int; //must comment, not valid
  int queenDragonKnight; //valid variable
  //int 99problems; //must comment, not valid
  //int variable3.3; // must comment, not valid
  int tipValue; //valid Variable
  cout << "--" << problem++ << "--" << endl;

  int polynomialDegree = 3;
  int coefficientValue = -1;
  cout << "f(x) = " << coefficientValue << "x^" << polynomialDegree << endl;
  coefficientValue = coefficientValue * polynomialDegree;
  polynomialDegree = polynomialDegree - 1;
  cout << "f'(x) = " << coefficientValue << "x^" << polynomialDegree << endl;

  cout << "--" << problem++ << "--" << endl;

  int n = 2;
  int x = 3;
  while (n > 0) {
    x = x * x;
    n = n - 1;
  }
  cout << x << endl;

  cout << "--" << problem++ << "--" << endl;

  string today = "day";
  cout << "Worksheets are ";
  if (today != "day") {
    cout << "not today!" << endl;
  }
  else {
    cout << "on Wednesday!" << endl;
  }
  cout << "--" << problem++ << "--" << endl;
  int sum = 1 + 0 + 1 + 0 + 1;
  int avg = sum / 5;
  cout << avg << endl;
  cout << "--" << problem++ << "--" << endl;
  float energyPotential; //double is okay. must use some sort of name corresponding to energy potential
  cout << "--" << problem++ << "--" << endl;
  cout << "Tests" << " are " << " useful " << " to test " << " knowledge " << endl;
  cout << "--" << problem++ << "--" << endl;
  string tooMany;
  cout << "input tooMany:";
  cin >> tooMany;
  cout << "--" << problem++ << "--" << endl;
  for (int i = 0; i < 5; i++) {
    cout << i + 3 << " ";
  }
  cout << endl;
  cout << "--" << problem++ << "--" << endl;
  int a = 7, b = 3, c = 1;
  if (c == 0) {
    cout << a + b << endl;
  }
  else if (c == 1) {
    cout << a - b << endl;
  }
  else if (c == 2) {
    cout << a * b << endl;
  }
  else {
    cout << a % b << endl;
  }
  cout << "--" << problem++ << "--" << endl;
  float base, h;
  cout << "input base and height: ";
  cin >> base >> h;
  if (base< 0 || h < 0) {
    cout << " input errors" << endl;
  }
  else {
    cout << 0.5 * base * h << endl;
  }

  cout << "--" << problem++ << "--" << endl;
  cout << "enter principle followed by interest: ";
  double p, i;
  cin >> p >> i;
  int count = 0;
  while (p < 10000) {
    p = p + p*i;
    count++;
  }
  cout << " this takes " << count << " time units" << endl;




  return 0;
}
