#include <stdio.h> int method(int x) { if (x > 2) return (method(x - 1) + method(x - 2)); else return 1; } int main() { int i; for (i = 1; i < 21; i++) printf("%5d", method(i)); printf("\n"); return 0; }
by: 发表于:2018-05-25 16:02:24 顶(0) | 踩(0) 回复
??
by: 发表于:2018-05-25 16:02:24 顶(0) | 踩(0) 回复
??
回复评论