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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
Asuccessful format string attack attempted to steal user account information by reading from unauthorized memory. answer the followings with proper explanation a)this attack will lead to violation of which security policies?
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e.g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
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
question
Chemistry, 13.08.2020 20:01
question
Mathematics, 13.08.2020 20:01
question
Mathematics, 13.08.2020 20:01
question
Arts, 13.08.2020 20:01
question
Mathematics, 13.08.2020 20:01
question
Mathematics, 13.08.2020 20:01
Questions on the website: 13722363