5 like 0 dislike
804 views
費式數列中,除了第一項第二項是一之外,之後的每一項皆為前兩項的和,請撰寫一程式,由使用者輸入N代表費是數列的第N項,程式會輸出第N項的值。

 

輸入說明:

輸入一個正整數N,代表要計算出費式數列的的N項,N大於0。

 

輸出說明:

輸出費式數列第N項的值。

 

輸入範例:

5

 

輸出範例:

5
[Exam] asked in 2017-1 程式設計(一)AD by (30k points)
ID: 29382 - Available when: Unlimited - Due to: Unlimited
| 804 views

18 Answers

0 like 0 dislike
Hidden content!
** ** ** * ** * ***** *** ** * * ***
100/100 answered by (174 points)
0 like 0 dislike
Hidden content!
* * * * * * **** ** *** **** *** ** ** ** ** *
20/100 answered by (202 points)
0 like 0 dislike
Hidden content!
****** ** ** * * *** * * * **** * ** *
100/100 answered by (224 points)
0 like 0 dislike
Hidden content!
****** **** ** * * * ** ** * * ***** * * **
20/100 answered by (215 points)
0 like 0 dislike
Hidden content!
** * ** * *** * ** *** ** * * ** * * * **
20/100 answered by (160 points)
0 like 0 dislike
Hidden content!
*** ** * ** **** * ******* ** **** * *** * *** **
100/100 answered by (172 points)
0 like 0 dislike
Hidden content!
** ** ** * * * * * * * * **** * * * **
20/100 answered by (190 points)
0 like 0 dislike
Hidden content!
* * **** * ** * * ** * * * * * ** **
5/100 answered by (196 points)
0 like 0 dislike
Hidden content!
*** ***** * ** * * * * * ** *
20/100 answered by (228 points)
0 like 0 dislike
Hidden content!
** * ** ** * * ** ** * * ** ** * * * ***
20/100 answered by (194 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.59.13
©2016-2024

Related questions

3 like 0 dislike
12 answers
[Exam] asked Dec 23, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 38938 - Available when: 2017-12-23 09:00 - Due to: 2017-12-23 12:10
| 1.9k views
2 like 0 dislike
0 answers
[Resource] asked Nov 9, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 31098 - Available when: Unlimited - Due to: Unlimited
| 17 views
2 like 0 dislike
0 answers
[Resource] asked Nov 9, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 31097 - Available when: Unlimited - Due to: Unlimited
| 14 views
2 like 0 dislike
0 answers
[Resource] asked Nov 9, 2017 in 2017-1 程式設計(一)AD by 楊修俊 (30k points)
ID: 31096 - Available when: Unlimited - Due to: Unlimited
| 17 views
12,783 questions
183,443 answers
172,219 comments
4,824 users