I have a lot of friends in Simon English School. One of them is my best friend. His name is boyd.
He and I are both thirteen years old. but I am older than he, and I am fatter than he too. He is shorter than I, and he is thinner than I. He wears a pair of glasses but I don't.
He likes to eat pocket-food, and he is a gentleman in a sense that when he has pock-food he will share them with us.
He and I are in the same school and in the same class. So, we can help each other. We alway play in the school together. he likes to do thing I like. He lives in the Ningbo Jiangdong, so he hardly came to my home in Zhenghai but I alway go to his home on weekends and he sometimes will come to my home on weekends. Sometimes we will fight but we alway get along well.
His mother is a doctor in the Li-Hui-Li hospital and I know where her office is. His father is a worker in the Bei-Lun power plant. He is a head of a group. So, his father has a lot of work to do.
He and I are in the same school. We usually have a good time so he is my best friend.
I have a very good friend. His name is Philip. As far as I'm concerned, he's very kind-hearted and generous. Once I was in high school, he treated me friendly and sincerely. When I was happy, he was also happy with me. When I was sad, he always comforted me. When I was defeated, he always encouraged me. When I stumbled, he always pulled me up. Although we quarreled at times, we were still in good relationships. We could know each other better after the argument. When my birthday came, he always sent me a special present.
我有一个很好的朋友。他的名字叫菲利普。我觉得他是非常善良和慷慨的。当我在高中的时候,他对我很友好、很真诚。我高兴的时候,他也和我一起开心。当我难过时,他总是安慰我。当我失败时,他总是鼓励我。当我迷茫时,他总是拉我一把。尽管有时候我们会吵架,我们关系仍然很好。争吵之后我们可以更好的了解对方。我生日的时候,他总是送我一份特别的礼物。
He's very hard-working and intelligent. He always studied hard at school. Because of his hard work, he always did very well in exams. His oral English was better than mine. Most of the time, he was willing to chat with me in English. Owing to his help, I made a lot of progress in oral English.
他非常勤劳也很聪明。在学校他总是很努力学习。由于他的努力,他总是能在中取得好成绩。他的英语口语比我好。大多数时候他都愿意用英语和我聊天。由于他的帮助,我在英语口语方面取得了很大的进步。
My name is Wu Yuwei .I’m 13 years old. I’m a Chinese girl .I study in Xinqi PrimarySchool.I’m in Class 3,Grade 6. I’m in Row 3. I have many friends in class.For example, Che Lei is my best friend . She is 13 years old , too. She is a good girl. We often help each other.There are four people in my family .They are my father, mother, sister and me .My parents are formers . They work hard. My sister is a student . I love them and they love me ,too.
Zeng Qiao is one of my friends. She is a beautiful, outgoingand good-tempered girl. She smiles frequently. I think it’s her smile that makes her beauty. We live in the same dormitory, so that we always stay together, no matter going to classroom or having dinners. At first, I don’t like her very much, because she is always talking. It seems that she can’t stop open her mouth. I am a little bit quiet and introverted, so I seldom talk to others. But gradually, I find that she can have influence on others by what she says. Zeng Qiao likes sharing interesting things with others. For example, she likes telling us her funny stories of her childhood or her former classmates. She always tells me that I should be more extroverted and learn to talk to others. Under the influence of her, I communicate with others more frequently and I find that it feels so great. I am so grateful that I can have such a good friend.
曾巧是我的一个朋友,她是个漂亮活泼,脾气又好的女孩子。她很喜欢笑,我觉得是她的笑容使她看上去漂亮。我们住同一间宿舍,因此不管是去教室还是吃饭都形影不离。之前我并不喜欢她,我认为她太喜欢说话了,总是停不住她的嘴。相反我性格内向,喜欢安静,很少跟别人说话。但是渐渐地,我发现她是个善于用言语影响别人的女孩子,她喜欢跟别人分享有趣的事,那些童年的故事或是以前同学的事情。她经常开导我要变得外向,多试着跟别人说话。在她的.影响下,我跟别人交流也更多了,并且发现这感觉非常好。我觉得有这样的朋友很幸运!
C语言while、do-while、for循环课程5
课程3中,提到C语言基本语句分为:数据定义语句,数据处理语句
数据处理语句又可分为:表达式语句,函数调用语句,空语句(;,复合语句,流程控制语句。
流程控制:指程序代码执行的顺序。流程的分类:顺序、选择、循环。
C语言的循环结构通过三种语句来实现,即while、do-while、forWhile语句的一般形式while(循环条件表达式循环体语句;
功能:当循环条件表达式为真,执行循环体语句,执行完了,再判断条件表达式是否为真,为真,则再执行,直到条件表达式为假时,退出while循环。
实例1:用while语句求1~100的累加和。
#include//C语言编译预处理命令,文件包含为stdio.h
voidmain(//至少有一个用main(命名的主函数,返回值为void无值类型{
inti=1,sum=0;/*初始化循环,定义变量i和累加器sum,定义和之前,累加器清零*/
while(i<=100
{
sum+=i;//sum+=i是一个复合赋值运算符,等价于sun=sun+i;i++;
}
printf("1+2+3+...+100=%d ",sum;//输出十进制数,1加到100累加器的和}
MicrosoftVisualC++6.0运行结果
使用while循环时,一定要对循环条件表达式中出现的变量提前赋值,并在循环体内修改有关变量的值,以使循环能趋于终止。
While循环为当型循环,do-while循环也叫直到型循环。
do-while语句的一般形式为:
do
{
循环体语句}while(
循环条件表达式
实例2:用do-while编制一个求n!的程序,n的值由键盘输入。
#include
voidmain(
{inti=1,n,p=1;
printf("请从键盘输入一个数,进行连乘积: ";
scanf("%d",&n;
do
{p=p*i;
i++;
}while(i<=n;
printf("连乘积的结果为p=n!:%d ",p;
}
分析:此程序,先定义三个变量i、n、p,p从p乘1开始执行,再i进行自增1,循环体中的语句执行完毕后,判断while的循环条件表达式,当i自增1为2时,看2是否<=输入的n值,若为真,则继续返回do循环,直到i自增的值比n大,则退出循环。
do-while主要用于人机交互,do-while循环是先执行后判断,do里面的循环体至少被执行一次。区别于while是先判断循环条件表达式,后执行。
for循环也叫步长型循环
一般格式:for(表达式1;表达式2;表达式3循环体语句;
功能:先执行表达式1,再执行表达式2,如果表达式2的值为真,就执行循环体语句,最后执行表达式3.完成一次循环后,从表达式2执行,直到表达式2为假,退出循环。
实例3:参考实例1,用while求1~100的累加和,现在用for语句求1~100的累
加和。
#include
intmain(void
{
inti;intsum=0;
/*初始化循环,定义变量i
和累加器sum,定义和之前,累加器清零*/
for(i=1;i<=100;i++
{
sum=sum+i;
}
printf("sum=%d ",sum;
return0;
}
实例4:爱因斯坦的`阶梯问题:有一个长阶梯,若每步上2阶,最后剩1阶;若每步上3阶,最后剩2阶;若每步上5阶,最后剩4阶;若每步上6阶,最后剩5阶;只有每步上7阶,最后刚好一阶也不剩。请问该阶梯至少有多少阶。编写一个C程序解决该问题。
#include
main(
{intx;
for(x=7;;x+=7
if(x%3==2&&x%5==4&&x%6==5
break;
printf("Thenumberoftheladdersis:%d ",x;
}
分析:发现x一定是7的整数倍,可以依次递增地求出7的整数倍的值(7*1、7*2、7*3……),每求出一值,就用该值与2、3、5、6进行取模运算,最先得到的满足上述5个方程式的x值即为本题的答案。
用while语句,简单快速实现爱因斯坦的阶梯问题
#include
intmain(
{
inti=1;/*i为所设的阶梯数*/
while(!((i%2==1&&(i%3==2&&(i%5==4&&(i%6==5&&(i%7==0
++i;/*满足一组同余式的判别*/
How was your day off?Did you have fun playing volleyball?Iwas very happy in my day off.I went to the movie with my friends.That movie was interesting,and I went to my cousin's home.I played computer game with him.It was so great .I went to the gift shop and saw many nice gifts.Of course.I bought a gift for my friend. It was a really nice gift.Oh,that day was so great!See you soon!
Love,
Jack
dear bob,
i'm very glad to learn that you will come to our city to study chinese in jianxin college of chinese in september, and equally glad to find a place for you to live in。 i've found a flat with a bedroom, kitchen and a bathroom, which is on the third floor of a building on fangcao street。 the 35-square-metre flat with furniture costs 500 yuan per month。
what's more, you'll find it very convenient to live here because a bus stop is right at the foot of the building。 and the college you will study in is at the next stop。 you can go to the college either by bus or on foot。 in addition, the environment of this area is very beautiful and people there are very friendly and helpful。
i hope you will come soon and enjoy your stay here。
best wishes!
yours
li hua
© 2022 zuowencangku.com,All Rights Reserved.