摘要:
/* 5.10 编写函数,求Fibonacci数列的第n项 */ #include "stdio.h"int fibonacci(int n); void main(){ int n; printf("求Fibonacci数列的第n项,请输入n\n"); scanf("%d", &n); /* VC6中n要小于 ? */ printf("Fibonacci数列的第%d项为... 阅读全文
posted @ 2008-04-19 19:39
emanlee
阅读(2479)
评论(0)
推荐(0)
摘要:
/* 5.6 编写函数,输出所有水仙花数 */ #include "stdio.h"int isdaffodil( int n ) ; /* isdaffodil函数原型声明 */ void main(){ int i; for( i=100; i999 || n<100) return 0; /* it is not a daffodil */ units=n%10... 阅读全文
posted @ 2008-04-19 18:05
emanlee
阅读(5893)
评论(0)
推荐(0)

浙公网安备 33010602011771号