s = 0 For i = 1 To 10 Step 3 s = s + i Next i Print s s的解是什么.
问题描述:
s = 0 For i = 1 To 10 Step 3 s = s + i Next i Print s s的解是什么.
为什么是22…… 怎么做的?
答
for i = 1 to 10 step 3是指i分别=1,4,7,10
利用s=s+i
即当i=1时,s=0+1=1;i=4,s=1+4=5;i=7,s=5+7=12;i=10,s=10+12=22
相关推荐
- 1.--我要去剧院看表演.--I’m going to see a play in the t( )2.--我的衣服怎么样?--What do you think of my c( ).---嗯,看上去很完美.--Well,they look p( )3.你的脚怎么了?---What‘s the matter with your f( )4.因为我的鞋是五码的.Beacause my shoes are s( ) five.
- 请帮我解决下面的英语作业吧从B栏中找出A栏中各句的应答语.A栏( )1.How are you?( )2.Hello!Is that Paul?( )3.Where’s My sweater,Mom?( )4.Would you like to come to my birthday party?( )5.What day is it today?( )6.Happy New Year!( )7.Can I help you?( )8.Could I use your dictionary?( )9.Jack,your T—shirt is very cool.( )10.What’s the date today?B栏A.Of course.Here you are.B.It’s September 21st.C.I’m very well,thank you.D.Yes,speaking.E.The same to you.F.Yes,please.I’d like a redG.Thank
- 英语的选择动词填空题,也要搭配时态变化design complete complain inquire fix remark tell operate1.the doctor _______ on Mr,Smith in the hospital yesterday2.I can to move to another place,because my roommate never stops _____.3.By the end of next year ,they ______ the fifth bridge over the Min River/4.this fantastic building _____ by a 17-year-old girl last year.5.You can't learn it well if you _______(not) your attention it6.Let's ______ about the train to London before w
- 1 I like peaches .I like cherries (改选择疑问句)2 This is watermelon juice (orange juice)( (改选择疑问句) 3 These blunt knives are (Mark's) ( 括号提问)4 That is (my mother's) swimsuit ( 括号提问)5 Are those purple grapes sweet (改肯定句)6 The sand is (very soft) ( 括号提问)7 These books are thick (一般疑问句 肯定回答)8 This green grape is (sour ) ( 括号提问)9 Please put your English book in the bag (改否定句) 10 Miss Fang has (many Chinese books) ( 括号提问)11 The tree's shadow grows short at noon (
- 下面划线部分的英文的中文意思是什么?1.Don't worry.I think we are in the same boat.----------------A.处境相同 B.同船相行 C.坐失良机 D.两船并行2.He's lazy.His bedroom is always sixes and sevens.----------------A.整整齐齐 B.七上八下 C.六神无主 D.乱七八糟3.Her brother is a lucky dog.-----------A.倒霉蛋 B.好运狗 C.可怜人 D.幸运儿
- 1.i like goldfish because they are beautiful and they (make no noise.)请问括号内的能这样表达吗don't make noise.2..it sounds fun to (用纸做衣服听起来很有趣).根据所给的汉语意思补全句子.请问为什么不能这样表达:use paper to make clothes.答案是make colthes out of paper.3.Ants smell very well ,let's watch them when we are free.请问 smell 是系动词,为什么well不能换成good 呢4.he 'd never bark or bite.请问'd是would 为什么不用will呢此处.
- 几道电功率,1.一标有2.5V 0.3A字样的灯泡L和最大电阻为20欧的滑动变阻器R串联,接到电压为U的电源上,下列错误的是A.若U=2.5V,无论怎么样移动滑片P,电路的总功率均不会超过0.75WB.若U>2.5V,且不损坏灯泡和变阻器,无论怎么样移动滑片P,电路的总功率一定大于0.75WC.当滑片P移动至某个位置时,L和R的电功率可以相等D.若U<2.5V,无论怎么样移动滑片P,L均不能正常发亮.2.一电动机线圈的电阻为1欧姆,线圈两端所加的电压为2V时,电流为0.8A,电动机正常工作.(1)在求电动机正常工作1分钟所消耗的电能时,有以下两种不同的解法小明解:W=UIt=2V×0.8A×60s=96J小华解:W=I²Rt=(0.8A)²×1Ω×60s=38.4J你认为哪位同学对,做出判断并说明理由(2)求电动机正常工作1分钟所转化的机械能同学,好歹我打了那么多,你的回答真简略
- 3道英语单选题(高考)1 Being a good listener is a kind of quality and that's ___ it takes to keep friendship.A how B what C which D where那 "what it takes to keep friendship"的it不是多余了2.A story goes _____ Elizabeth I of England liked nothing more than being surrounded by clever and qualified noblemen at court.A when B where C what D that说是同位语从句,那goes为什么不在句末?还有A和B为什么不行?3 We were very hungry ,but we couldn't eat in a restaurant because ____ of us had ___ money on us
- 读短文,选择正确的答案.Hello,I'm Lisa.Today is Women's Day.It's my birthday,too.I invite some friends to my home.They're Lucy,John and Sarah.Lucy gives me a pen.Sarah gives me a kite.I like the presents very much.We have a birthday party.We eat dance at the party.We have a good time.1:Lisa's birthday is in ( ).A:March.B:May.C:April.2:Lisa in vites her ( )to her home.A:cousins.B:teachers.C:friends.3:Lisa gets three ( )A:presents.B:pens.C:kites.4:They ( )and dance
- 用括号中词的适当形式填空 It’s imporant()(obey)the traffic rules I would advise you用括号中词的适当形式填空1.It’s imporant()(obey)the traffic rules2.I would advise you()(not buy)that T-shirt.It makes you look fatter3.Everyone must wear()(suit)clothes on every occasion4.This story is one of()(intesting )stories of all5.When you play the game ,you must keep your eyes()(close).6.Mother allows me()(chat) with my friends on the Internet once a week7.()(hide)in the forest is a good
- for i=1 to 5 step 2 i=i+1 next i print i 这个答案是什怎么算
- 下列实验操作中,错误的( ) A.蒸发操作时,不能使混合物中的水分完全蒸干后,才停止加热 B.蒸馏操作时,应使温度计水银球靠近蒸馏烧瓶的支管口处 C.分液操作时,分液漏斗中下层