answersLogoWhite

0

//program that displays Fibonacci series using arrays[]

//author: me

#include

#include

#include

void main ( void )

{

clrscr();

unsigned long f[3];

int i=0,s=2;

f[0]=1,f[1]=1,f[2]=0;

while(i<10)

{

f[0]=f[1]+f[2];

cout<

f[1]=f[0]+f[2];

cout<

f[2]=f[0]+f[1];

cout<

i++;

s++;

}

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Draw a flow chart to find HCF of two given numbers?

First you will need to pick out the two numbers. Then you can use your textbook and the instructions in order to draw out the flow chart.


A chart of prime numbers?

There is an infinite number of them, so of course there is no chart with all of them. If you google prime number, you can find list of the first 1000 or even 10000 primes. That should do it, I think


Make a program that displays the first four perfect numbers?

int main (void) { puts ("6 28 496 8128"); return 0; }


Flow chart to find the sum of sqares of first ten natural numbers?

Charts, diagrams and pictures cannot, at present, be shown on wikianswers


Do a tally chart for deficient numbers?

A tally chart for deficient numbers would categorize them based on their definition: deficient numbers are positive integers greater than zero that are greater than the sum of their proper divisors. For example, the first few deficient numbers are 1, 2, 3, 4, and 5. In a tally chart, you would list these numbers and mark tallies next to each to indicate their frequency; however, since we are only listing the first few, it might look like this: Number | Tally 1 | | 2 | | 3 | | 4 | | 5 | | Each number appears once, so each has one tally mark.


The first step in creating a chart is to?

Normally the first thing that is done is that the data is selected. Then you would start the Chart Wizard. However, it is possible to start the Chart Wizard first and select the data later.


What chart position did JLS first song reach?

Their first single "Beat Again" reached number 1 in the UK chart.


Make a C programming that displays the first four perfect numbers?

create a program that iterates until it finds a perfect number, then store that perfect number into an array. Continue iterating until you find three more. Then, you have an array of four perfect numbers.


Draw a flowchart to accept two numbers and check if the first is divisible by the second?

Convert this in flow chart and see if it can help Start Display "Enter 2 numbers" Accept 2 numbers A &amp; B Divide the A with B Is result Zero? ---- No - A is not Dividable with second Yes - A is Dividable with second End


How do you beat level 16 on duck think outside the flock?

Here's a chart! -The D's stand for the ducks! 4DDDD 3DDDD 2DDDD 1DDDD 1234 Read this chart bottom number first, then side number! Here are the numbers to push: 4,3 2,4 1,2 &amp; 3,1 This worked for me!


Who originally made what is now known as a pie chart?

The first pie chart was created in 1801 by William Playfair. He was a Scottish business man as well as an engineer, and used this first pie chart as a form of illustration.


What number represents the median of the data in the chart?

To determine the median of the data in a chart, you would first need to organize the numbers in ascending order. The median is the middle value; if there is an odd number of values, it is the middle one, and if there is an even number, it is the average of the two middle values. Without the specific data from the chart, I cannot provide a numerical answer. Please provide the data for a precise calculation.