Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
- 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.
- 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.
- Create a function called DieRoll. It should create a random number between 1 and 6 and return the result.
- 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.
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started