皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【单选题】
下面程序的功能是从键盘任意输入一个4位数x,编程计算x的每一位数字相加之和(忽略整数前的正负号)。例如,输入x为1234,则由1234分离出其千位1、百位2、十位3、个位4,然后计算1+2+3+4=10,并输出10。程序的运行结果如下:Input data is:-4213↙The sum of the total bit is 10按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include #include intmain(){inti1,i2,i3,i4,k,n;printf("Inputdatais:");scanf("%d",&n);k=fabs(n);//取绝对值i1=___________;//分离出千位i2=___________;//分离出百位i3=___________;//分离出十位i4=___________;//分离出个位printf("Thesumofthetotalbitis%d\n",i1+i2+i3+i4);return0;}
A.
第9行:   k / 1000 第10行:  (k - i1 * 1000) / 100 第11行:  (k - i1 * 1000 - i2 * 100) / 10 第12行:  k % 10
B.
第9行:   k % 1000 第10行:  (k - i1 * 100) / 10 第11行:  (k - i1 * 1000 - i2 * 100) % 10 第12行:  k % 10
C.
第9行:   k % 100 第10行:  (k - i1 * 1000) / 100 第11行:  k / 10 第12行:  (k - i1 * 100 - i2 * 10) / 10
D.
第9行:   k % 10 第10行:  (k - i1 * 1000) / 10 第11行:  (k - i1 * 1000 - i2 * 100) / 10 第12行:  k / 10
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【简答题】某县生产企业为增值税一般纳税人,员工30人,注册资本50万元。主营办公用品。2011年有关经营情况和纳税情况如下: (1)销售办公用品开具专用发票150万元,开具普通发票58.5万元,以物换货取得原材料一批,换出资产公允价值20万元(不含税),企业已经确认收入,出租商铺,取得租金收入10万元; (2)销售成本120万元,增值税26.84万元,营业税金及附加2.96万元; (3)销售费用60元,其中...
【多选题】企业发生的下列支出中,按规定可以使用现金支付的有( )。
A.
支付职工张华的差旅费2 000元
B.
支付银行承兑汇票手续费1 000元
C.
支付外聘专家员工培训讲课费8 500元
D.
支付购置打印机款8 000元
【单选题】What can be inferred about Ms. Dorothy Yost from her e-mail?
A.
She will review the handouts as soon as they become available.
B.
She has some options to offer the agenda.
C.
She and Ms. Linda Davis coordinated the last workshop.
D.
She conducts workshops overseas.
【单选题】第二篇 A Desert Between Paul and Clara Paul had long promised to marry Clara. But at thirty-three he met and married Alice. Clara was driven mad. Paul was taken to court. The judge ordered him to pay Cla...
A.
he had borrowed $600 from her.
B.
he had broken his word to marry her.
C.
he had promised to give her $600.
D.
he had spent a lot of her money.
【单选题】Aunt Clara arrived by ______.
A.
car
B.
plane
C.
train
D.
boat
【单选题】A Desert Between Paul and Clara Paul had long promised to marry Clara.But at thirty·thee he met and married Alice.Clara was driven mad. Paul was taken to court.The judge ordered him to pay Clara$600 b...
A.
he had borrowed $600 from her.
B.
he had broken his word to marry her.
C.
he had promised to give her$600.
D.
he had spent a lot of her money.
【多选题】企业发生的下列支出中,按规定可以使用现金支付的有( )。
A.
支付职工张华的差旅费2 000元
B.
支付银行承兑汇票手续费1 000元
C.
职工王明报销差旅费1 500元
D.
支付购置打印机款8 000元
【简答题】La stanza di Clara è sempre pulita e ( ) [ordinare].
【多选题】企业发生的下列支出中,按规定可以使用现金支付的有( )。
A.
支付职工张华的差旅费2 000元
B.
支付银行承兑汇票手续费1 000元
C.
职工王明报差旅费1 500元
D.
支付购置打印机款8 000元
【简答题】Clara spent much of the summer going to London to______.
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题