#include <stdio.h>void main(){ int i=0,old=2,first=0,second=0,third=0,sum=0; for(i=0;i<20;i++) { old=old+third; third=second; second=first; first=old; }
sum=old+first+second+third; printf("20个月后一共有%d只耗子! ",sum);}
分析图: