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
Pros and cons of access to a wide range of online services when it comes to an individual's safety?
Contact [7]
Talk about cyber bullying but also all of the advancement and conviences of technology
Hope that helps
6 0
2 years ago
Which of the following describes colors, spacing, borders, and other effects that change the appearance of a table?
lisabon 2012 [21]
It is the table style that describes colors and spacing borders and other effects that change the appearance of the table
5 0
3 years ago
Create a file account.cpp containing a Bank Account Class.
Daniel [21]

Answer:

#include <iostream>

using namespace std;

class BankAccount {

  string name = name;

  double balance = balance;

  BankAccount( string name, double balance ) {

    string name = name;

    double balance = balance;

     return 0;

  }

  string getName( ){

     return name;

  }

  double getbalance( ) {

     return balance;

  void setName( string username){

     name = username;

  }

  void setbalance( double newBalance){

     balance = newBalance;

  }

int main( ) {

  BankAccount user1(John, 0.0);

  BankAccount user2(Jane, 0.0);

  user1.setbalance( 2300.00)

  user2.setbalance( 4300.00)

  cout << user1.getname() << user1.getbalance();

  cout << user1.getname() << user1.getbalance();

}

Explanation:

The C source code above using a class to create a data structure of a bank account user name and balance. The attribute name and balance are private to the class and can be retrieved and modified through the get and set methods.

3 0
2 years ago
What is workflow? how do you create your own workflow?
lana66690 [7]
A workflow consists of an orchestrated and repeatable pattern of business activity enabled by the systematic organization of resources into processes that transform materials, provide services, or process information.


Create a detailed outline of what you want to achieve and sketch a workflow diagram before using workflow chart software or templates. This will help to ensure your chart is accurate and complete. Always consider your process and workflow manageability when inserting logic in your workflow chart. You can use decision symbols, connectors and text boxes. Always confirm the accuracy of your workflow chart with other stakeholders.


(If you need to know what the workflow diagrams layout is just look it up. GL.)
6 0
3 years ago
What is 9 - 3 ÷ 1/3 + 1 = ?
Ainat [17]
The answer is 9
Hope I helped you
6 0
3 years ago
Read 2 more answers
Other questions:
  • What is the purpose of lookup tables in spreadsheet software
    13·2 answers
  • An office employee working in a payroll department uses a customized program to log hours employees have worked. The customized
    12·2 answers
  • True or false.the color attribute cannot recognized the hexadecimal code.
    7·2 answers
  • Eye wash stations should contain enough water to provide ______ minutes of continuous use
    5·2 answers
  • _____ of a global information system (GIS) concentrates on medium-range activities that move an organization toward achieving lo
    7·1 answer
  • QUESTION 4 of 10: What term refers to the basic characteristics of a population segment, such as gender, age, and income?
    12·2 answers
  • Divide 111001 by 1101​
    7·1 answer
  • 10. Differentiate between equity share &amp; preference share.​
    11·1 answer
  • What are the characteristics of the sorting and grouping options in Outlook? Check all that apply. Columns can be sorted by clic
    15·2 answers
  • What is an outcome in a game? Don't search google just give me an answer
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!