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
Serga [27]
3 years ago
9

Write an application program in C++ to implement a class Fibonacci to print Fibonacci series upto N using member function series

() .
​

Computers and Technology
1 answer:
fiasKO [112]3 years ago
5 0

Answer:

Program approach:-

  • Using the header file.
  • Using the standard namespace I/O.
  • Define the main function.
  • Display the number of terms.
  • Display the Fibonacci series.
  • Print the first two numbers.

Explanation:

Program:-

//header file

#include <iostream>

//using namespace

using namespace std;

//main function

int main() {

   int n, s1 = 0, s2 = 1, nextTerm = 0;

//display the number of terms

   cout << "Enter the number of terms: ";

   cin >> n;

//display the Fibonacci series

   cout << "Fibonacci Series: ";

   for (int j = 1; j <= n; ++j) {

       // Prints the first two terms.

       if(j == 1) {

           cout << s1 << ", ";

           continue;

       }

       if(j == 2) {

           cout << s2 << ", ";

           continue;

       }

       nextTerm = s1 + s2;

       s1 = s2;

       s2 = nextTerm;

       

       cout << nextTerm << ", ";

   }

You might be interested in
Anyone trying to play?
Lunna [17]

Answer:

no

Explanation:

7 0
3 years ago
Read 2 more answers
True of False - use T or F An abstract class can have instances created using the constructor of the class.
Sindrei [870]

Answer:

False

Explanation:

An instance of an abstract class cannot be created through the constructor of the class, because it does not have a complete implementation. Though, it is possible to have references of an abstract type class. Abstract classes are incomplete structures and you would have to build onto it before you are able to use it.

7 0
4 years ago
For whom is beneficial to deduct the amount paid in state income tax from their income for purposes of computing federal income
Musya8 [376]

Obvious advantages stem from being able to deduct the full cost of state and local taxes you have to pay each year. Every deduction from taxable income helps, and these taxes can sometimes be significant. It's something of a double hit if you have to pay taxes to your state and also pay federal tax on taxes you paid to your state.

The state and local tax deduction (SALT) prevents that from happening, at least to some extent.

Rules for the SALT Deduction

All income taxes that are imposed by a state, local, or foreign jurisdiction can be deducted subject to a few rules.

First, you must itemize your deductions on Schedule A to claim them. This means foregoing the standard deduction, which is often more than the total of a taxpayer's itemized deductions for the tax year. Don't be penny wise and pound foolish and give the Internal Revenue Service more money than you have to. Make sure your total itemized deductions exceed the standard deduction for your filing status so itemizing is worth your while. Otherwise, you'll be paying taxes on more income than you have to, which was what you were trying to avoid in the first place.

The tax must be imposed on you personally. You can't claim a deduction for income taxes paid by one of your dependents—and in some cases, even by your spouse. You must have paid them during the tax year for which you're filing.  

Eligible expenses that can be deducted as state and local income taxes include:

Withholding for state and local income taxes as shown on Form W-2 or Form 1099

Estimated tax payments you made during the year

Extension tax payments you made during the year

Payments made during the year for taxes that arose in a previous year

Mandatory contributions to state benefit funds

8 0
3 years ago
Jacek has just started a new job as a sales clerk, and his first task is to create a new sales invoice. Which Microsoft software
g100num [7]

Answer:

Microsoft Excel

Explanation:

Microsoft Excel is a Microsoft application package. It is a spreadsheet application used to analyse and manipulate data. It has columns which are referred to fields and rows also known as records.There are various features in excel that used to create statistical and graphical esctasies and data presentations.

It can be used to create template for CVs/resumes, Bank draft, receipts and invoice etc.

5 0
3 years ago
All of the different devices on the internet have unique addresses.
Sindrei [870]

Answer:

Yes

Explanation:

Just like a human fingerprint, no 2 computers are the same.

3 0
3 years ago
Other questions:
  • If I were to install python in kali linux on a Acer 11 Chromebook and C730 would I be able to hack python with it since I have n
    15·1 answer
  • List and describe the issues that lead to making a successful website?​
    9·1 answer
  • What is intergrated circuit ic​
    10·1 answer
  • What kind of fragment is near the computer?
    14·1 answer
  • Where could an identity theft access your personal information?
    9·2 answers
  • sometimes people who have been playing gta for a while are annoying, i was playing gta this weekend and was trying to escape, bu
    8·2 answers
  • Que significa el término “Informática”?
    11·1 answer
  • Who is responsible for developing the physical background for the characters by creating buildings, landscapes, and interiors?
    14·1 answer
  • After you create a pie chart, you can move it to its own chart sheet.
    9·1 answer
  • How do we store value in a variable? Give an example
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!