Home > Back-end >  New c programming
New c programming

Time:09-17

For Fibonacci (the first 40 Fobonacci) sequence number, this series has the following characteristics: 1, 2, number 1, starting from the number 3, each number is the sum of the first two Numbers, what is the sequence number of 40 each?
Tip: each row of five data output, each data output width is 12 characters, (10)
Subject content:

For Fibonacci (the first 40 Fobonacci) sequence number, this series has the following characteristics: 1, 2, number 1, starting from the number 3, each number is the sum of the first two Numbers, what is the sequence number of 40 each?

Tip: each row of five data output, each data in an output area, namely the data between the data and use \ t split,

Input format:

There is no



The output format:

1 1 2 3 5

8, 13, 21, 34, 55

89 144 233 377 610

987 1597 2584 4181 6765

10946 17711 28657 46368 75025

121393 196418 317811 514229 832040

1346269 2178309 3524578 5702887 9227465

14930352 24157817 39088169 63245986 102334155

Input the sample:

There is no



The output sample:

1 1 2 3 5

8, 13, 21, 34, 55

89 144 233 377 610

987 1597 2584 4181 6765

10946 17711 28657 46368 75025

121393 196418 317811 514229 832040

1346269 2178309 3524578 5702887 9227465

14930352 24157817 39088169 63245986 102334155

Time limit: 500 ms memory limit: 32000 KB

CodePudding user response:

If you can use an array, is very simple, good output control, also can use variables, without array carted three variables, then do count with one variable, is used to control the output line,
  • Related