int a{1,2,3,4,5,6,7,8,9},k,s=0;for(k=0,k

chaochaoqunqun2022-10-04 11:39:541条回答

已提交,审核后显示!提交回复

共1条回复
s神s 共回答了19个问题 | 采纳率84.2%
*(a+k)其实就相当于指针;指向a[k];
k=0时,执行第一次循环 s=s+a[0]=0+1=1; 然后k=k+2;K=2;
k=2时,执行第二次循环 s=s+a[2]=1+3=4; 然后k=k+2;K=4;
k=4时,执行第三次循环 s=s+a[4]=4+5=9; 然后k=k+2;K=6;
k=6时,执行第四次循环 s=s+a[6]=9+7=16; 然后k=k+2;K=8;
因为k=8时,不满足条件k
1年前

相关推荐

m = 1 n) { __int64 m = 1
trg317391年前1
-极端hh- 共回答了21个问题 | 采纳率85.7%
m的值为:把1左移n-1个二进制位的值.
intX[][4]={{1,2,1,1},{2,3,1,4},{1,8,5,11},{1,9,6,12}}中X[2][2
intX[][4]={{1,2,1,1},{2,3,1,4},{1,8,5,11},{1,9,6,12}}中X[2][2]的值是?
zsdxiaxia1年前1
lsh0408 共回答了22个问题 | 采纳率86.4%
intX[0]{1,2,1,1}
intX[1]{2,3,1,4}
intX[2]{1,8,5,11}
intX[2][0] = 1
intX[2][1] = 8
intX[2][2] = 5
这样能明白吗?
Int w = 'A',x = 14,y = 15; W = ((x || y) && (w < 'a' )); A.-
Int w = 'A',x = 14,y = 15; W = ((x || y) && (w < 'a' )); A.-1 B.NULL C.1 D.0
罗敷公主1年前1
jht711 共回答了18个问题 | 采纳率88.9%
答案为C
x||y为1
w
Int(x/2)<>x/2 Fix(x/2)<>x/2 vb
Int(x/2)<>x/2 Fix(x/2)<>x/2 vb
Int(x/2)<>x/2
Fix(x/2)<>x/2
whisperbibi1年前1
mm77xx 共回答了18个问题 | 采纳率88.9%
两个意思一样.那个表达式所表达的意思是x不能被2整除
a=2,b=3,x=3.5,y=2.5,求(float)(a+b)/2+(int)x/(int)y的值?
a=2,b=3,x=3.5,y=2.5,求(float)(a+b)/2+(int)x/(int)y的值?
集思广益嘛...
地狱gg者1年前3
磕睡人 共回答了28个问题 | 采纳率82.1%
答案:2.5+3/2=2.5+1.5
=4.0
(a+b)/2是浮点型,故等于2.5
(int)x是把x转变为整型,故为3
(int)y是把y转变为整型,故为2
于是就为以上答案.
int w= A ,x=14,y=15; W=((x||y)&&(w< a )); w的值?
wangshuke1年前1
liujianhui2006 共回答了22个问题 | 采纳率100%
下面是详解过程,
C语言中,关于逻辑值的问题就是,非0即为真,
以问题为例,x,y都不等于0,即x,y都为真,进行“或”运算“||”时,有一个为真即为真
所以x||y逻辑值为1;
C语言中,有一个字符与整数想对应的ASC||码表,'a'=97,'A'=65,所以w
main(){int x[]={1,2,3,4,5,6,7,8,9}int s,i,*p;s=0;p=&x[0];fpr
main(){int x[]={1,2,3,4,5,6,7,8,9}int s,i,*p;s=0;p=&x[0];fpr(i=1;i
远行的火狼1年前1
99693296 共回答了18个问题 | 采纳率83.3%
你的程序有问题,数组越界了
p指针指向x中的第一个.
i=1 *(p+i)=2 s=0+2=2
i=3 *(p+i)=4 s=2+4=6
i=5 *(p+i)=6 s=6+6=12
i=7 *(p+i)=8 s=12+8=20
下面这里就出问题了
i=9 *(p+i)已经超出了数组范围 s此时得到一个乱码
For most of us, the rain that falls on our roof runs off int
For most of us, the rain that falls on our roof runs off into the ground or the sewer(下水道) system. But if you want to save a little water and reuse it on your lawns or plants --- or even use it for laundry, dishes, or other needs --- collecting rainwater from your gutter’s downspouts(檐槽的水落管) is a no-brainer.
According to John C. Davis, writing in E / The Environmental Magazine, just about any homeowner can collect rainwater, given that the roof and gutters do most of the work. And since an inch of rain falling on a 2,000-square-foot roof produces some 1,200 gallons of water, you can harvest enough to water your lawn or garden.
Plants and grass actually do better when fed rainwater instead of tap water, which is usually treated with substances that can hold back plant growth. Using rainwater can also extend the life of pipes, since the salts added to tap water may gradually damage the pipes. However, homeowners should set up a water purification system if they do plan to use rainwater for inside needs.
Rainwater harvesting can also be good for the local community, as it reduces the erosion, flooding, and pollution associated with heavy rainfall, and reduces dependence on public water supplies. So some states fund rainwater collection systems in their local communities.
Many varieties of rain barrel(桶) systems, starting at just $100, are available for home use. A typical setup is simply a rain barrel positioned under a gutter’s downspout. Skillful homeowners can make their own water harvesting systems, but buying one is a lot easier. Most garden centres offer a range of choices as well as tips.
小题1:The underlined word “no-brainer” in Para. 1 probably means something that ______.
A.is hard to deal with B.is very easy
C.is of no real value D.deserves more attention
小题2:From Paragraphs 3 and 4, we can learn _______.
A.how to set up a water harvesting system B.how a rain barrel system works
C.some advice on saving tap water D.the benefits of using rainwater
小题3:What is the topic of the passage ?
A.Basic gardening skills. B.Water-saving techniques.
C.Wastewater treatment systems. D.Roof rainwater collection.
云飞扬晓初寒1年前1
locklovelone 共回答了14个问题 | 采纳率78.6%
小题1:B
小题2:D
小题3:D

JAVA里for(int a:b)
JAVA里for(int a:b)
public class arrs {x09
x09 int[] ax09=x09{x0910,1,5,2,4,3,8,7,6,9x09};
x09
x09 forx09(int b:a){
x09x09 System.out.print(b);
x09x09 }
}
提示Syntax error on token "for", Identifier expected,
苦难人10131年前1
落霞伴孤鹭 共回答了18个问题 | 采纳率88.9%
public class arrs {
static int[] a={10,1,5,2,4,3,8,7,6,9};
public static void main(String[] args){
for(int b:a){
System.out.print(b);
}
}
}
没有主方法你是没有办法测试的
The air from that box p___ the car and then the car fell int
The air from that box p___ the car and then the car fell into the river.
决处风声1年前1
jupiter521 共回答了22个问题 | 采纳率81.8%
pushed
(1) x=2.5,a=7,y=4.7,求x+a%3*(int)(x+y)/24的值?
(1) x=2.5,a=7,y=4.7,求x+a%3*(int)(x+y)/24的值?
最好说明一下过程...
例如为何等于2.5,
因为我算得的结果是2.79
qmag907_nn6bf21年前4
3516965 共回答了20个问题 | 采纳率75%
x=2.5,a=7,y=4.7,求x+a%3*(int)(x+y)/24的值
把x,a,y的值代入x+a%3(int)(x+y)/24得
2.5+7%3*(int)(2.5+4.7)/24
先把7%3(%的意思是取余数),所以计得1
则2.5+1*(int)(2.5+4.7)/24
(int)(2.5+4.7)/24,先把2.5+4.7,然后再取整数部分
(int代表取整)
则2.5+1*0.29
所以答案是2.79
i have a neck ,but i don‘t have a head.you can put water int
i have a neck ,but i don‘t have a head.you can put water into my body.wha
圆圆丫丫1年前2
linyi0811 共回答了22个问题 | 采纳率86.4%
ottle 水瓶
请及时采纳,多谢!
a=3,x=IIF(a>5,int(-5.6),Fix(5.6)),求x的值
SARS非典1年前3
bai0561 共回答了11个问题 | 采纳率100%
a=3:x=IIF(a>5,int(-5.6),Fix(5.6))
False
用VB的立即窗口,X= False
int a[]={5,10,15,20,25,30}; int b=LA(a,4); int c=LA(a+2,3);p
int a[]={5,10,15,20,25,30}; int b=LA(a,4); int c=LA(a+2,3);printf("%dn %dn",b,
#include "stdio.h"
int LA(int *a,int n)
{
int i,s=0;
for(i=0;i
dajingpuwang1年前1
骆驼ci 共回答了13个问题 | 采纳率100%
int a[]={5,10,15,20,25,30};这一句的意思是定义一个数组a,a中存了5,10,15,20,25,30这6个数
LA函数有两个参数,一个数组a(a就代表一个指针值),一个n,函数的作用是求数组a中前n个数的和.
int b=LA(a,4);参数是a和3,所以a就代表以上定义的数组a的首地址,也就是从5开始,这一句的意思是将数组a中的前4个数求和,结果存在b中,所以b=5+10+15+20=50
int c=LA(a+2,3);参数是a+2和3,a代表数组a的首地址,a+2就将指针移到15那,这一句的意思是将数组a中从第3个算起的3个数求和存在c中,所以c=15+20+25=60.
main() { int a=18,b=11; while (a!=b) {while(a>b) a-=b;while(
main() { int a=18,b=11; while (a!=b) {while(a>b) a-=b;while(b>a)b-=a;}printf("%d,%dn",a,b);}
#include
main()
{ int a=18,b=11;
while (a!=b)
{while(a>b) a-=b;
while(b>a) b-=a;
}
printf("%d,%dn",a,b);
}
这个程序 怎么算出来 结果是1 1的 怎么我算了半天不对呢
麻烦 各位在帮我看看这俩个 好么
三月libby1年前1
忧伤的家长 共回答了20个问题 | 采纳率85%
为了方便说明,把3个while分别称为循环A、B、C
1.第一次A循环
a=18,b=11
进入B循环
a=7
进入C循环
b=4
2.第二次A循环
进入B循环
a=3
进入C循环
b=1
3.第三次A循环
进入B循环:
第一次B循环
a=2
第二次B循环
a=1
此时,a=1,b=1
不满足A、B、C循环的条件,循环结束,结果就是1,1
题号:7139int a=1,b=2,c=2;while(a
thshikai1年前1
jidean 共回答了19个问题 | 采纳率100%
a
The place of _ in the World Park are very () I'm very _ (int
The place of _ in the World Park are very () I'm very _ (interest) in it
hewui86ge1年前3
汤圆的小丫头 共回答了14个问题 | 采纳率100%
interest,interesting,interested
int j;int x[3][3]={1,2,3,4,5,6,7,8,9}; for (j=2; j>=0; j--)
int j;int x[3][3]={1,2,3,4,5,6,7,8,9}; for (j=2; j>=0; j--) printf("%2d",x[j][2-j]);
tail99991年前1
qwer111q 共回答了17个问题 | 采纳率88.2%
你只需要把二维数组分为3行3列按行列式排列一下
结果是 7 5 3
Text1 = Text1 + Chr(Int(Rnd * 26) +
一起PS11年前1
klingjf 共回答了19个问题 | 采纳率100%
Int(Rnd * 26) + 97的意思是随机生成97-122的整数(a-z的ACSII码)
Chr(Int(Rnd * 26) + 97)将数字转换成字母
Text1 = Text1 + Chr(Int(Rnd * 26) + 97)text1的原有内容再加上一个小写字母
Peter didn’t like to use his head.He never put his heart int
Peter didn’t like to use his head.He never put his heart into his 36 when
he was at school.So he couldn’t pass the exams and he could 3 7 finish middle
school.Later on he found work in a factory.At first he worked in an office,but he was 38 to do his job.He was sent to a workshop to do some unskilled Work.
He was always 39 when he got home and went to bed as soon as he had supper.
Once the young man asked a barber to cut his long hair off.He found the work was 40 and light.He decided to be a 41 too.He took the barber as his teacher.
Three months passed,but he learned 42 and the barber lost his patience and told
him to go home.Peter stayed at home and had nothing to do.His father helped him to 43 a barber’s shop in their small town,44 nobody would have their hair
cut in his shop.His father wanted others to believe Peter and asked his son to cut
his hair off.However,Peter was 45 nervous that he cut his father’s ear off.
The old man began to call out,“Ear!My ear!” Peter picked the ear up and said,“Stop shouting,Daddy!Your ear is here!”
36.A.games B.ideas C.studies D.business
37.A.happily B.hardly C.easily D.comPletelv
38.A.able B.unable C.disable D.readv
39.A.tired B.interested C.excited D.surDrised
40.A.tiring B.dirty C.dull D.clean
41.A.student B.driver C.barber D.clerk
42.A.nothing B.something C.anything D.everything
43.A.sell B.finish C.close D.oDen
44.A.although B.if C.but D.since
45.A.too B.very C.such D.so
wag101chs_0_f931年前1
myok 共回答了21个问题 | 采纳率95.2%
36 C 37 B 38 B 39 A 40 D 41 C 42 D 43 D 44 C 45 D
int *a,b; b=123; a=&b; b=b+1; Edit1->Text =IntToStr(*a); *a=
int *a,b; b=123; a=&b; b=b+1; Edit1->Text =IntToStr(*a); *a=124为什么等于123?
jilinyizhihua281年前1
Jing421 共回答了22个问题 | 采纳率86.4%
虽然我不知道你的Edit->Text 是什么意思
首先 a指向b的地址, b存放的是123
然后,b=b+1 这个时候,b存放的是124
因为a是指向b的地址的,所以*a 就是b的内容,也就是124
Main() {int x[][4]={1,2,3,4,5,6,7,8,3,9,10,2,4,2,9,6},s=0,k=
Main() {int x[][4]={1,2,3,4,5,6,7,8,3,9,10,2,4,2,9,6},s=0,k=0; for(;k
高晓宝1年前1
zenghaojie 共回答了15个问题 | 采纳率93.3%
从x[0][0]一直叠加到x[3][3],即所有的数据相加,答案为://81//
I didn't mean to be bump into you 和I didn't mean to bump int
I didn't mean to be bump into you 和I didn't mean to bump into you 两句表达都是正确的吧
前一句语法语法上怎么解释
asst4211年前1
黛尘 共回答了15个问题 | 采纳率73.3%
I didn't mean to bump into you是正确的,bump是动词,be bump则形式不对了.
MOD(n,d) = n - d*INT(n/d)
MOD(n,d) = n - d*INT(n/d)
1
2
3
4
5
A B
公式 说明(结果)
=MOD(3,2) 3/2 的余数 (1)
=MOD(-3,2) -3/2 的余数.符号与除数相同 (1)
=MOD(3,-2) 3/-2 的余数.符号与除数相同 (-1)
=MOD(-3,-2) -3/-2 的余数.符号与除数相同 (-1)
8 5 = 3
8 -5 = -2 这条用运算试怎么理解为什么=-2
-8 5= 2 不理解
-8 -5 = - 3
5 8 = 5 不理解
-5 8 =3 不理解
5 -8 = -3 不理解
-5 -8= -5 不理解
上面的公式说明不够详细都等于1,-1,实际结果这样的
正的好理解8/5余3,
5/8除不尽余5,负的怎么理解,带负号的,前小后大的用于哪里
9yofix1年前1
chenhao2007 共回答了18个问题 | 采纳率88.9%
8 -5 = (-5)*(-2 ) +(-2) 所以为-2
-8 5= 2 不理解 -8 5=( -2)*5+2 所以=2
5 8 = 5 不理解5 8=0*8+5 所以=5
-5 8 =3 不理解-5 8=(-1)*8+3 所以=3
5 -8 = -3 不理解5 -8 =(-1)*(-8)+(-3) 所以=-3
-5 -8= -5 不理解-5 -8=0*5+(-5) 所以=-5
int a[ ][3]={1,2,3,4,5,6,7,8,9,10,11,12};int*p=a;求 *(*(a+2)+
int a[ ][3]={1,2,3,4,5,6,7,8,9,10,11,12};int*p=a;求 *(*(a+2)+2)的含义(或值
魔女潘多拉1年前1
yyflxl 共回答了18个问题 | 采纳率94.4%
值是9,int a[ ][3]={1,2,3,4,5,6,7,8,9,10,11,12};是定义一个二维数组,他有3列 由后面的十二个元素可知它有4列.int*p=a;是定义一个实数指针,*(*(a+2)+2)就是指数组a[2][2所以是9.(下标从0开始算)]
int a = 4; A.a += (a++); (B).a +=(++a) (C).(a++) += a; (D).(
int a = 4; A.a += (a++); (B).a +=(++a) (C).(a++) += a; (D).(++a)+=(a++)解答过程,错误原因.
上面四个选项中,有错误的,请把正确的解答,并写出计算过程.错误的请说明原因.
crazycf1年前1
亲爱的别咬我 共回答了12个问题 | 采纳率91.7%
A:a+=(a++) 先计算a++ ,因为a为后++,所以a为4,然后a += 4,这时a的值改为5,4+5=9;
B:a+=(++a) 先计算++a,因为a为前++,所以a为5,然后a += 5,这时a的值改为5,5+5=10;
C::(a++) += a 这个是错误的.因为左值只能变量,(a++)是后++,所以a不会先计算a++,而a个数值4.所以会报错.
D:(++a) +=(a++) 先计算++a,a的值为5,然后再去计算a +=(a++) ,同样.先计算a++,因为a为后++,所以a的值为5,然后计算a += 5这时a的值为6.所以为11;
you might use any of the words int the bank more the once.
leegaoyu1年前1
放手是爱 共回答了22个问题 | 采纳率81.8%
我觉得提问者是不是打错了单词了,应该是blank而不是bank
这个话的意思是:你可以使用适合单词填在空白处,且不限制单词的使用次数(意思就是你可以重复使用单词填空)
1:10/3*9= 2:10+16%3= 3:设a=7,x=3.5,y=4.7,则x+a%3*(int)(x+y)%24
1:10/3*9= 2:10+16%3= 3:设a=7,x=3.5,y=4.7,则x+a%3*(int)(x+y)%24= 我是菜鸟.
warmsmile771年前1
一窗月色 共回答了13个问题 | 采纳率100%
10/3*9=3*9=27
10+16%3=10+1=11
x+a%3*(int)(x+y)%24=3.5+7%3*(int)(3.5+4.7)%24=3.5+1*(int)(8.2)%24=3.5+1*8=11.5
Int(X),Exp(X),Log(X),ASC(X),Chr(X),Val(X),Str(X),Len(X),Mid(
Int(X),Exp(X),Log(X),ASC(X),Chr(X),Val(X),Str(X),Len(X),Mid(X,n,k),Fix(X)说出它们的意思.vb中常用标准函数的意思?
无敌公主1年前1
7074153 共回答了26个问题 | 采纳率92.3%
常用标准函数也叫内部函数,VB内部函数大体分5类:数学函数、转换函数、字符函数、时间/日期函数和随机函数.
int(X)取整函数.返回值为不大于X的最大整数.
Exp(X)指数函数,返回值国以e为底、以X为指数的值.
log(x)对数函数.返回值为x的自然对数.
ASC(x)求求字符串X的第一个字符的ASCII 编码
Chr(X)把X转换为相应的字符,是一个合法的ASCII码值.
Val(X)返回值为字符串X中所包含的数值,若遇到字母则终止转换.
Str(X)返回值为X的字符串形式.
Len(X)返回字符串X的长度.
Mid(X,n,k)从X第n个字符开始,向后截取k上字符.
Fix(X)作用是直接舍去小数部分取整.
1.When ___ taken___(take) into a dark room,the boy burst int
1.When ___ taken___(take) into a dark room,the boy burst into tears. 为什么不能用 having been taken?
2.You must speak louder so taht you can make yourself __heard__(hear)
为什么不能用 to be heard?
3.I can't imagine how they could stand __leading__(lead).
为什么不能用to lead?
帮帮忙
wori21年前2
林欣花开 共回答了15个问题 | 采纳率100%
1.第一题目的正解是 when taken into.在when之后也有可以用ING的情况,一般是用在主动的,而且when后面引导的是一个时间从句,主题是the boy,应该是被动.所以taken答案最好.
2make/sb/sth done 说的是让某人某事怎么样,里面的题目是“你必须要说大声点,这样你才会让他们听到” 这是一个被动,因为说的是你的话让别人听到.
3.could stand +doing 代表的意思 是“不能够忍受做某事” 这个意思不是“站”了.
常规搭配