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
Misha Larkins [42]
3 years ago
9

Construct an algorithm to print the first 20 numbers in the Fibonacci series (in mathematics) thanks

Computers and Technology
1 answer:
ss7ja [257]3 years ago
8 0

Answer:

0+1=1

1+1=2

1+2=3

2+3=5

3+5=8

5+8=13

Explanation:

// C++ program to print

// first n Fibonacci numbers

#include <bits/stdc++.h>

using namespace std;

 

// Function to print

// first n Fibonacci Numbers

void printFibonacciNumbers(int n)

{

   int f1 = 0, f2 = 1, i;

 

   if (n < 1)

       return;

   cout << f1 << " ";

   for (i = 1; i < n; i++) {

       cout << f2 << " ";

       int next = f1 + f2;

       f1 = f2;

       f2 = next;

   }

}

 

// Driver Code

int main()

{

   printFibonacciNumbers(7);

   return 0;

}

 

You might be interested in
Which emerging technologies will have more injury on our day to day country &amp; How?​
qwelly [4]

Explanation:

Complete the sentence with the words below stop push direction slow down move shape speed up pull A force is a. or a.

4 0
2 years ago
Small robots that can move around on the surface of a planet are called space shuttles.
PolarNik [594]

b:false because space shuttles orbit around a planet in outer space



3 0
3 years ago
Read 2 more answers
How does one build social capital?
iren2701 [21]

Answer:

by building on line presence

Explanation:

If you put yourself out there in multiple social sites you will build a following

3 0
2 years ago
Apakah ada yang bisa menjelaskan potongan source code ini?
GarryVolchara [31]

This code attempts to fuse two strings together. So,

fuse("Apple", "Banana")

would return "ABpapnlaen a"

However, there are a couple of things wrong with this code:

- The for loop is incomplete (probably a copy paste error)

- It is unclear from the code if the array jawaban will overflow if kata1 and kata2 are large (it probably will)

- Biggest problem: the jawaban array is declared on the stack, which means it will be cleaned up when the function returns. So the caller of this function will reference unallocated memory! This is a huge bug!!

6 0
3 years ago
Linux is: Select one: a. primarily concerned with the tasks of end users. b. designed for specific machines and specific micropr
ivann1987 [24]

Answer:

C. an example of open-source software.

Explanation:

open-source software is the type of software in which anyone can access, it can also be shared And modified by anyone simply because ita accessible to the public.

Hence and open source software's source code can be

inspected, enhanced and modified by anyone. A typical example is Linux.

7 0
3 years ago
Other questions:
  • Why are open standards important in the data communications industry?
    5·1 answer
  • ________ are used to translate each source code instruction into the appropriate machine language instruction.
    11·1 answer
  • Write a program in C++ or C that includes two different enumeration types and has a significant number of operations using the e
    15·1 answer
  • How do entrepreneurs traditionally use computers? check all of the boxes that apply.​
    13·2 answers
  • which program monitors the computer by looking for known trouble makers as well as suspicious behavior​
    11·1 answer
  • Hey does anyone know the name of that movie where like this teenage girl is chilling at her house then there is an outbreak of s
    6·1 answer
  • Which of the following is the file type of Microsoft® Publisher files?
    12·2 answers
  • Give one (1) advantage and one(1) disadvantage of using and integrated software package over a custom written one.
    15·1 answer
  • La estructura basica de una pagina web en Html​
    11·1 answer
  • Which of the following items can you locate in a document using the navigation pane? Choose the answer.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!