Question: C++ Programming The Lucas sequence starts with the numbers 2 and 1. It adds the two previous numbers to get the next number. So the

C++ Programming

  1. The Lucas sequence starts with the numbers 2 and 1. It adds the two previous numbers to get the next number. So the third number in the sequence is 3 and and the fourth number is 4. Create a function that outputs the first k Lucas sequence numbers.
  2. Create a function called QuadraticFormula that takes in a,b, and c and does the quadratic formula. It should first check that b2- 4ac is not negative; if it is, end the program. If it is not, output to the console the two solutions.
  3. Create a function called DieRoll. It should create a random number between 1 and 6 and return the result.
  4. Create a function called MultyDieRoll. It should take in an integer and run the function DieRoll that number of times, printing out each result to the console.
  5. Create a function called checkSquares. It should take in two numbers bottom and top. It should output to the console any numbers in the range from bottom to top that are perfect squares. So if you take in 5 to 20 it should output 9 and 16 to the console.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!