using r studios to solve 3 questions

using r studios to solve 3 questions