1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zhuklara [117]
3 years ago
13

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te

rms will be:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

a term index is entered and Fibonacci sequence is calculated up to that term.

If the index is 5 then the sequence is : 0, 1, 1, 2, 3

if the index is 7 then the sequence is : 0, 1, 1, 2, 3, 5, 8

Write a program that will print the Fibonacci sequence to the term index entered by the user.

The program will ask you if you want to print another sequence; if Yes repeat if No end your program
Computers and Technology
1 answer:
AlexFokin [52]3 years ago
3 0

//C++:

#include <iostream>

#include <string.h>

using namespace std;

int F(int n) {

 if(n == 0) {

   return 0;

 }

 if(n == 1) {

   return 1;

 }

 else  

   return F(n-1) + F(n-2);

 }

int main()

{

   int index;

   int ok=0;

   char x[3];

   do{

   cout<<"index=";cin>>index;

   for(int i=0;i<index;i++)

   cout<<F(i)<<' ';

   cout<<endl;

   cout<<"Repeat? (Yes/No):";

   cin>>x;

   if(strcmp(x,"No")==0)

   ok=1;

   cout<<endl;

   }while(ok==0);

   return 0;

}

You might be interested in
alex needs to email his graduation certificate to a prospective employer. he has only physical copies of the certificate. what d
svlad2 [7]
He should use a scanner, which would convert an image into an electronic file.
7 0
3 years ago
​User documentation _____. Group of answer choices ​allows users to prepare overall documentation, such as process descriptions
MatroZZZ [7]

Answer:

And user documentation consists of instructions and information to users who will interact with the system

Explanation:

user documentation will not allow user to prepare overall documentation because it is already prepared so not A.

user documentation does not need implementation, So not B.

user documentation may not be a printed one . So not C

And user documentation consists of instructions and information to users who will interact with the system, so D is the right option

3 0
3 years ago
Explain the differences between copyright, fair use, and trademark?
ValentinkaMS [17]

A trademark is an easily recognizable symbol, phrase, or word that denotes a specific product. It legally differentiates a product or service from all others of its kind and recognizes the source company's ownership of the brand.

"Copyright" literally means the right to copy but has come to mean that body of exclusive rights granted by law to copyright owners for protection of their work. Copyright protection does not extend to any idea, procedure, process, system, title, principle, or discovery.

Fair use is a doctrine in United States law that permits limited use of copyrighted material without having to first acquire permission from the copyright holder.

7 0
3 years ago
5. Write a program to remove any duplicate letters from a word and display the new word maintaining the original order. For exam
dexar [7]

Answer:

word = input('Enter a single word: ', 's');

n = length(word);

nodupWord = [];

for i = 1:n

  dup = false;

  c = word(i);

  for j = 1:i-1

      if word(j) == c

          dup = true;

          break;

      end

  end

  if ~dup

      nodupWord = [nodupWord, c]; %add the non-duplicate char to end

  end

end

disp(['Adjusted word: ', nodupWord])

Explanation:

The code is in Python.

3 0
3 years ago
Renée’s job entails using a company laptop to constantly open other peoples’ workbooks, sorting the data, importing a new sheet
nevsk [136]

she should leave and go somewhere else for a mminute to cool and then come backa nd close tabs.

6 0
3 years ago
Other questions:
  • Your revenue is $22,000. Your Cost of Goods is 16,250. Your gross profit is _____________, fill in the blank,.
    14·1 answer
  • You are able to change the formatting of a table after it is inserted into a placeholder. True or false
    9·2 answers
  • When looking to attract a local audience, why it is important to optimise your website and content for mobile users?
    12·1 answer
  • What does it mean to say RAM is volatile? *
    9·1 answer
  • What do you call when a hacker users multiple guest computers to crack a password?
    11·1 answer
  • Can Anybody Answer This
    8·1 answer
  • SUMMING THE TRIPLES OF THE EVEN INTEGERS FROM 2 THROUGH 10) Starting with a list containing 1 through 10, use filter, map and su
    15·1 answer
  • Which of the following are advantages of a local area network, as opposed to a wide area network? Select 3 options.
    8·1 answer
  • Multiply the following two Tom's Tiny floating-point format numbers (8-bit: sign bit, 3-bit 2's complement exponent, 4-bit fract
    12·1 answer
  • Write a summary on the video "Greatest Inventions w/Bill Nye".
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!