Answered You can hire a professional tutor to get the answer.

QUESTION

Trying to make a function that calculates a Shaffer number. A Shaffer number starts with 1, then each successive number is...

Trying to make a function that calculates a "Shaffer" number. A "Shaffer" number starts with 1, then each successive number is equal to double the current number, and then 3 added to that. So, the first few numbers are:

1 // Now double it, plus 3

5 // Now double it, plus 3

13 // etc.

ALSO: display the numbers in rows of 5 numbers across, each 5 characters wide. You will need to set the width to 9 to make the outputs match. IMPORTANT! Your program must actually calculate the numbers. You can not store the answers in the program.

int main()

{

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question