subject

Show a menu to the user with the following choices: a, b, c, q (Show the menu once and use a do-while statement to prompt the user for a menu command): a – Display all odd numbers between n1 and n2. Ask the user to enter two numbers, n1 and n2, using the int data type. Using any looping mechanism (determine which loop works best), display all odd numbers between n1 and n2 b – Determine if a number is in the Fibonacci sequence (Wiki, Pop Culture references: The Davinci Code, 21) . The Fibonnacci sequence starts with the numbers 1 and 1. The next number in the sequence is the sum of the preceding two numbers. In this case, 1 + 1 = 2. The 3rd term is 2. Now we have 1, 1, 2. The next term adds 1 + 2 = 3. The first few terms of the sequence looks like 1, 1, 2, 3, 5, 8, 13, 21, 34, etc. Ask the user to enter a number (an integer) Take the user’s number and determine if this number can be found in the Fibonacci sequence. Show a message to the user whether it is or isn’t in the sequence. HINT: Write a loop that generates the successive term

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 08:00, ionmjnm3041
The managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an .
Answers: 3
image
Computers and Technology, 23.06.2019 11:00, abdulbasharee99
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
image
Computers and Technology, 24.06.2019 02:50, rurbanok12
Be sure to answer all parts. synthesize the following compound from benzene. a. b. c. d. e. f. reaction [1] conditions: a b c d e f reaction [1] product: draw structure reaction [2] conditions: a b c d e f reaction [2] product: draw structure reaction [3] conditions: a b c d e f reaction [3] product:
Answers: 3
image
Computers and Technology, 24.06.2019 06:30, chloeholt123
For which utilities, if any, does the landlord pay?
Answers: 2
You know the right answer?
Show a menu to the user with the following choices: a, b, c, q (Show the menu once and use a do-whil...

Questions in other subjects:

Konu
Mathematics, 17.07.2019 03:40
Konu
English, 17.07.2019 03:40
Konu
Mathematics, 17.07.2019 03:40
Konu
Social Studies, 17.07.2019 03:40