问题
解答题
1,1,2,3,5,8,13,…这一列数的规律是:第1、第2个数是1,从第3个数起,该数是其前2个数之和.试编写一个程序,计算这列数中前20个数之和.
答案
i=3;
A=1;
B=1;
sum=A+B;
while i<=20
i=i+1;
C=A+B;
sum=sum+C;
A=B;
B=C;
end
print(% io(2),sum);
1,1,2,3,5,8,13,…这一列数的规律是:第1、第2个数是1,从第3个数起,该数是其前2个数之和.试编写一个程序,计算这列数中前20个数之和.
i=3;
A=1;
B=1;
sum=A+B;
while i<=20
i=i+1;
C=A+B;
sum=sum+C;
A=B;
B=C;
end
print(% io(2),sum);
It was very cold outside my car. I did not want to get out of it__31__we passed by a cafe. Suddenly I noticed a short old man, __32__ with some bits of cloth, shaking(摆动)with the cold. He was waiting for anyone who would__33__ him a coin or a cup of hot coffee. I asked my __34_ to go over and hand this old man something. He __35__ into my husband’s face, smiled and said, “__36__ . ” I felt so happy and I wished the old man could live __37__ the cold night. I was sure to meet him again and find out how he was the next__38__, as I have to pass this way every day. I did so the next evening, and he remembered the__39__and came up to my window and __40__ at me. This time I offered(提供) him a __41__of food. He reached out for the bag and I gave him my hand. He __42__ the food, smiled and said, “May God bless you.” I looked at the old man and he __43__ me think of my father. I do hope all of us will remember that maybe one day, it could happen to one of us, __44__ please do not pass by a __45__ person without offering at least a word of love and a kind smile or an act of kindness of any kind.
|