C語言解決猴子吃桃的問題的代碼

下面代碼是關於C語言解決猴子吃桃的問題的代碼,希望對各位有一些好處。
#include "stdio.h"
#include "conio.h"
main()
{
int day,x1,x2;
day=9;
x2=1;
while(day>0)
{
x2=x1;
day--;
}
printf("the total is %dn",x1);
getch();
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章