PS 4

  1. Write a programme that pushes TFFTT back onto a vector of bools and then makes a second vector whose elements are the negation of the first; print out both.
  2. Amend the previous programme so that the negation is done in a function.
  3. Write a programme that asks the user to input a string then creates a vector of chars out of the string.
  4. Amend the previous programme so that it asks for a seed as well and a string and then encrypts the string by adding rand()%10 to the int of the char, looping back around to 32 if it goes over 126, before converting back into char and printing out the code word. So (input string and seed random number generator)->(convert to vector of chars)->(convert char to int and add a random number between 0 and 9)->(convert back to char, taking 95 away if needed)->(print out)