# I need solve this type calulation is 0,1,1,2,3,5,8,13,21,34 etc. u send me the code of this type of calculation in c++ language

Posted by on

• Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Novelist:

An expert who has written 50 answers of more than 400 characters.

Champion:

An expert who has answered 200 questions.

• Expert

Hi,

I think you are one good student with interest in C++. I am reminded of my days in college. When my teacher asked me the same question, I wrote it in three formats. I am putting them all here. Wish you a very good learning time in the world of C/C++

Type 1:
********
#include<stdio.h>
void main()
{
int n;
int fibo(int,int,int);
printf("\nEnter number of terms in series:");
scanf("%d",&n);
fibo(n,0,1);
}
fibo(int n,int a,int b)
{
int c;
printf(" %d ",a);
c=b;
b+=a;
a=c;
if(n>0) fibo(n-1,a,b);
return 0;
}

Type 2:
********

#include<stdio.h>
void main()
{
int i,j,a=0,b=1,c;
printf("\nEnter number of terms in the series:");
scanf("%d",&i);
for(j=1;j<=i;j++)
{
printf(" %d ",a);
c=b;
b=a+b;
a=c;
}
}

Type 3:
********

#include<stdio.h>
void main()
{
int i,a=0,b=1,c;
printf("\nEnter number of terms in series:");
scanf("%d",&i);
while(i>0)
{
printf(" %d ",a);
c=b;
b=a+b;
a=c;
i--;
}
}

**************************
Come back anytime for any program in basic C++. All my old codes wrote during my college days are lying without any use. :)

Have a nice day.

Posted on Nov 28, 2008

• Chintu-KPV Nov 28, 2008

Forgot to tell you one thing,

The IO statements in my programs are all in 'C' level only. Use IOSTREAM class members for the same, if you want the program to look like a 'real' C++ one. :)

×

• Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Novelist:

An expert who has written 50 answers of more than 400 characters.

Governor:

An expert whose answer got voted for 20 times.

• Expert

Here is a Pascal stub
================

Program Fibonacci;

const
nmax = 500;

type
t_Farray = array [0 .. nmax-1] of LongInt ;

var
Farray : t_Farray;
i : word;

Begin
Farray [0] := 0; writeln(Farray [0]); // Initialize the ******
Farray [1] := 1; writeln(Farray [1]); //

for i:=2 to nmax-1 do begin
Farray[i] := Farray[i-2] + Farray[i-1];
Writeln (Farray[i]
end;

end.

Posted on Nov 13, 2008

• Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Governor:

An expert whose answer got voted for 20 times.

Scholar:

An expert who has written 20 answers of more than 400 characters.

• Expert

Ok! Here's a snippit from some code I wrote in beginning c++ classes. However, don't just cut and paste it. Know how it works since it's important in algorithm examination!

Just tested it, compiles and runs perfectly on GCC 4.0.1 on my mac, as well as my linux boxen. Windows may take some changes to output data.

/***********************************************
* Steven Parker
* Calculating Fib Sequence
* after two starting values, each number is the
* sum of the two preceding numbers
***********************************************/
#include <iostream>
using namespace std;

int main() {
int whentostop = 20; //How many values of sequence to calculate
int fib[whentostop]; //Hold fib numbers

for (int i=0; i < whentostop; i++) {
if (i == 0)
fib[0] = 0;
else if (i == 1)
fib[1] = 1;
else
fib[i] = fib[i-1] + fib[i-2];

cout << "Fibonacci[" << i << "]: " << fib[i] << endl;
}
return 0;
}

Posted on Nov 13, 2008

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
goodluck!

Posted on Jan 02, 2017

×

my-video-file.mp4

×

## Related Questions:

### The system cannot find the file specified

Connect the calculator to the computer and turn it ON. Open the TI connect software. Locate your file on your computer, do a CTRL C to copy. Drag and drop the file on the Main window of TI connect. If file is compatible with TI 84 Plus, it will be transferred to your calculator. Use the Memory management of the calculator to locate the transferred file in calculator.

Dec 17, 2013 | Texas Instruments TI-84 Plus Silver...

### How do you enter grouped data into STAT section of calulator. Eg if you had frequency 40 for x=5, frequency 37 for x=6.7 etc of statitical data, (eg 400 data entries?). Rather that entering every...

I just posted an answer to a question, and I believe it answers yours and a bit more.

1. Arrange you data in ascending order
2. Determine the frequency of each datum (for un-grouped data)
3. Turn Calculator ON
5. Highlight STAT icon and press EXE
6. Enter the data item in list1 and frequency in list2
7. When finished entering data press F1:Graph
8. Select Graph1, Graph2 or Graph3 or SET to fine tune
9. Select the Type of graph (Histogram)
10. Select the lowest boundary of the first class (to align)
11. Set the class width
12. Press EXE to draw.
They are in chronological sequence. If not just rearrange the sequence.

Apr 02, 2011 | Casio FX9750GII Graphic Calculator

### Hello, my name is Michiko Bursey, and I dropped by TI-84 graphing calulator. It still gives out correct answers to solved math and chemistry problems, but sometimes a small or medium ink blot (blue) ...

I have a TI-83 and there has been a dark spot on my screen for several years and it has not been a problem. Try to use yours for as long as possible unless the screen is unviewable.

Mar 04, 2011 | Texas Instruments TI-84 Plus Calculator

### How do you turn on calulator?

Hi, to turn on the "Calculator; click on the "Start Button," next in the [Start Search] window, type: calculator, scroll to find the "Calculator Short-cut" in the listings, and click on it to open. "Thanks for using Fix'Ya; you can rate the help if you like."

Jul 02, 2010 | Toshiba Satellite A135-S2276 Notebook

### How do i use my calulator to slove this problem .5/6(12x 6) 1/2(6x 14) I need to know how to program and use my calulator for a basic algebra class

The keystrokes you would use to solve the problem is as follows:
(I will use the / to indicate the division symbol)

.5
/
6
X
[( key
12
X
6
)] key
X
1
/
2
X
[( key
6
X
14)] key
=

Jun 08, 2010 | Casio FX-250HC Calculator

### Explorer plus calculator display dims as more numbers are entered. No battery is present in this style calculator.

you may need more light but there are batteries in your calulator and you need to replace them check on the back cover for what type you need .

Oct 08, 2009 | Texas Instruments Explorer Plus Scientific...

### How To Calulate??.

Hello,
If you are comfortable manipulating such an expression, I suspect your are also very able to scour the research litterature to find out if the unsung hero who has found a way to express the pressure in some non ideal fluid with 6 virial coefficients, has also provided a short and sweet way to solve for the temperature. (My guess).

To lift any ambiguity in the expression use extra parentheses in your last term:where does the denominator stop?

My suggestion is that you write a program to solve numerically for T or use some powerful software like Mathematica to obtain an analytical solution.

Good luck.

Mar 02, 2009 | Casio FX-300MS Calculator

### Trigonometry

take scientific calculator and solve it .scientific calculator also help u in future.or either go to start option and use ur computer calulator in scientific mode

Jun 10, 2008 | Microsoft Office Outlook 2003 for PC

### How do I calculate exponential functions?

The y^x button is right next to the x^2 button. It is labled with an x raised to a square box (which I will write as x^box). Thus, if you enter (for example)

2 x^box 5 = 32

Mar 30, 2008 | Casio FX-115ES Scientific Calculator

#### Related Topics:

157 people viewed this question

Level 3 Expert

Level 3 Expert