题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-24 00:19:20

[填空题]下面程序的功能是:计算1~10之间的奇数之和与偶数之和,请填空。
#include<stdio.h>
main( )
int a,b,c,i;
a=c=0;
for(i=0;i<=10;i+=2)
a+=i;
______;
c+=b;
printf("偶数之和=%d",a);
printf("奇数之和=%d",c-11);

更多"下面程序的功能是:计算1~10之间的奇数之和与偶数之和,请填空。 #"的相关试题:

[填空题]下面程序的功能是:计算1~20之间的奇数之和与偶数之和,请填空使程序功能完整。
#include<stdio.h>
main( )
int a=0,b=0,c=0,i;
for(i=0;i<=20;i+=2)
a+=i;
______;
c+=b;

printf("偶数之和=%d/n",a);
printf("奇数之和=%d/n",c-21);

[填空题]下面程序的功能是:计算1~10之间的奇数之和与偶数之和,请填空。
#include<stdio.h>
main( )
int a,b,c,i;
a=c=0;
for(i=0;i<=10;i+=2)
a+=i;
______;
c+=b;
printf("偶数之和=%d",a);
printf("奇数之和=%d",c-11);
[填空题]下面程序的功能是:计算1~10之间奇数和及偶数之和。
#include <stdio.h>
main ( )
int a, b, c, i;
a=c=O;
for (i=O; i<=10;i+=2)
a+=i; 【5】
c+=b;

printf("偶数之和=%d/n",a);
printf("奇数之和=%d/n",c-11);

[填空题]以下程序的功能是计算字符串的长度。请填空。 #include<stdio.h> main( ) {char str[100],*sp=str; int nlen=0; scanf("%s",str); for(;*sp!=’/0’;sp++)______; printf("%d",nlen); }
[填空题]下面程序的功能是输出数组s中最小元素,请填空。
#include<iostream.h>
void main( )
int k, p, s[]=1,-9,7,2,-10,3;
k=s[0];
for(p=0;p<6;p++)
if(s[p]<k) [11]
cout<<k;

[填空题]下面程序的功能是输出数组s中最大元素的下标,请填空。 #include <stdio.h> main( ) { int k, p,s[]={1, -9,7,2, -10,3}; for(p =0,k =p; p<6; p++) if(s[p]>s[k]) 【13】 printf("%d/n", k); }
[填空题]下面程序的功能是将一个字符串sfr的内容颠倒过来,请填空。
#include<string.h>
main( )
int i,j, (13) ;char str[]="1234567";
for(i=0,j=strlen(str) (14) ;i<j;i++,j--)
k=str[i];str[i]=str[j];str[j]=k;
printf("%s/n",str);

[填空题]下面程序的功能是将一个字符串str的内容颠倒过来,请填空。
#include<string.h>
main( )
inti,j, 【8】 ;char str[]="1234567";
for(i=0,j=strlen(str) 【9】 ;i<j;i++,j--)
k=str[i];str[i]=str[j];str[j]=k;
printf("%s/n",str);
[填空题]下面程序的功能是输出两个字符串中对应相等的字符。请填空。
#include <stdio.h>
char x[]="programming";
char y[]="Fortran";
main( )
int i=0;
while(x[i]!=’/0’&&y[i]!=’/0’)
if(x[i]==y[i])
printf("%c",______);
else
i++;

[填空题]下面程序的功能是将字符串s中所有的字符a删除。请填空。 #include<stdio.h> void main( ) {char s[80]; int i,j=0; gets(s); for(i=0;s[i]!=’/0’;i++) if(s[i]!=’a’)______; s[j]=’/0’; puts(s);}
[填空题]下面程序的功能:输出100以内能被3整除且个位数为6的所有整数,请填空。
# include<stdio. h>
main( )
int i, j;
for(i=0; i<10或i<=9; i++)
j=i*10+6;
if( 【15】 )continue;
printf("% d", j);


我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码