橙准


私信TA

用户名:chenzhun

访问量:2348

签 名:

等  级
排  名 11996
经  验 927
参赛次数 1
文章发表 2
年  龄 18
在职情况 学生
学  校 长大
专  业

  自我简介:

TA的其他文章

#include<stdio.h>

int main()

{

int old = 1, new1 = 0, new2 = 0, new3 = 0, year, total;

printf("please input the year.\n");

scanf_s("%d", &year);

while (year != 0)

{

while (year > 1)

{

old = old + new3;

new3 = new2;

new2 = new1;

new1 = old;

year--;

}

total = old + new1 + new2 + new3;

printf("%d\n", total);

}


return 0;

}


 

0.0分

0 人评分

  评论区

这样会超限啊
2017-10-23 22:33:06
没看懂
2017-10-21 13:51:58
  • «
  • 1
  • »