Toggle navigation
Courses
Questions
Tags
Users
第一次期中考_Question2
5
like
0
dislike
1.3k
views
費式數列中,除了第一項第二項是一之外,之後的每一項皆為前兩項的和,請撰寫一程式,由使用者輸入N代表費是數列的第N項,程式會輸出第N項的值。
輸入說明:
輸入一個正整數N,代表要計算出費式數列的的N項,N大於0。
輸出說明:
輸出費式數列第N項的值。
輸入範例:
5
輸出範例:
5
midterm
[Exam]
asked
Oct 27, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 29382 -
Available when:
Unlimited
-
Due to:
Unlimited
|
1.3k
views
comment
Please
log in
or
register
to add a comment.
18
Answers
0
like
0
dislike
Hidden content!
** * ** * * *** ** ***** * * * ** * ** *** **
answered
Oct 27, 2017
by
s410535044
(
114
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* **** * * ** *
int ***
{
* int ** * *
**** * **** while(1){
* **** ** * *** * * * ** ** ** ** ** **
* *** * * * ** * ** * * *** *** ** ** * *
* * * *** ** * * * *** ******** * *
****** * ** * *** * * ** if(n==0)
** **** * **** * ** * *** * *
** * * * * * * * * * * * else if(n==1)
*** * * * * * ** * * * ** * * = n_1;
****** else{
**** * ** * * * * ** *
* * *** ** * * * **** *** * *** ****** * **
** * ** * * ** * * ***** * ***** * * * ** n_2=n_1;
**** * * * ** * ** * ** * ** * ** * n_1=fib;
* * * ******** * * ** * * * *** * * }
* ** * * ** ** * * * * * ** ** n_2=0;
* * ** ** *** * ** ** ** * ** n_1=1;
** * ** ** ** * * ** } ******** * * * * *
*** ** ** * ** * * *** ** ** ****** **** * ** ** **
* * *** * }
** * * * * return 0;
}
** * * * *
100/100
answered
Oct 27, 2017
by
花蓮彭于晏
(
150
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * ***** * ** * * *** * * **** * * * * *** *
100/100
answered
Oct 27, 2017
by
s410535043
(
100
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
*** * ** ** * * ** * *** * * * ****
answered
Oct 27, 2017
by
410536051
(
194
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * **** * ** ** *** * ** * ***** ***** * * * *
30/100
answered
Oct 27, 2017
by
410536015
(
236
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * * ** *** *** ** ** * * ** ** * * * *
answered
Oct 27, 2017
by
eddiepon
(
202
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * * * ** ****** ** * * ** ** * ** * *
100/100
answered
Oct 27, 2017
by
lee580346
(
192
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
**
answered
Oct 27, 2017
by
thopd
(
12.1k
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
2
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.71.222.73
©2016-2025
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
|
2.8k
views
midterm
2
like
0
dislike
0
answers
第一次期中考補考_Q4及其參考答案
[Resource]
asked
Nov 9, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 31098 -
Available when:
Unlimited
-
Due to:
Unlimited
|
17
views
midterm
2
like
0
dislike
0
answers
第一次期中考補考_Q3及其參考答案
[Resource]
asked
Nov 9, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 31097 -
Available when:
Unlimited
-
Due to:
Unlimited
|
14
views
midterm
2
like
0
dislike
0
answers
第一次期中考補考_Q2及其參考答案
[Resource]
asked
Nov 9, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 31096 -
Available when:
Unlimited
-
Due to:
Unlimited
|
17
views
midterm
12,783
questions
183,442
answers
172,219
comments
4,824
users