作者:广东在线游戏网日期:
返回目录:游戏资讯
void main()
{
char c;
printf("输入一个字符:");
scanf("%c",&c);
printf("后继字度符是问%c,ASCII码为答%d\n",c+1,c+1);
printf("当前字符是%c,ASCII码为%d\n",c,c);
printf("前驱字符是%c,ASCII码为%d\n",c-1,c-1);
}
这个程序应该满足你的要求了,而且版我已经通过权调试了。
9、a=1,b=3,c=2 (必须按scanf格式输抄入)
10、a[1][1]的值是0 (初值赋值只给了每行第一个元素,其余元素未指定值,默认0。)
11、1 ( 逻辑表达袭式)
12、循环百结构
13、这个题目有问题,变量a,b没有指定类型度
,'/'是整除符号整数除以整数,只保留知整数部分。浮点数参与运算,就保留小数。
所以这里如果ab是整数,填0。
如果ab中有浮点数,填0.64。
14、int *p=NULL;
15、传值道或者传址
#include <stdio.h>
int main()
{char num[24][10]={"zero","one","two","three","four","five",
"six","seven","eight","nine","ten","eleven","twelve","thirteen",
"fourteen","fifteen","sixteen","seventeen","eighteen","nineteen",
"twenty","thirty","forty","fifty"};
int h,m;
scanf("%d%d",&h,&m);
printf("%s",num[h]);
if(m>0)
{if(m<21)printf(" %s",num[m]);
else
{printf(" %s",num[m/10+18]);
if(m%10>0)printf(" %s",num[m%10]);
}
}
else printf(" o'clock");
printf("\n");
return 0;
}
#include <stdio.h>
void delchar(char *string,char c)
{
char *p,*q;
p=q=string;
while (*q!='\0')
{
if (*q!=c)
*p++=*q++;
else
q++;
}
*p='\0';
}
int main()
{
char string[80];
char c;
int repeat;
scanf("%d",&repeat);
while (repeat--)
{
getchar();
gets(string);
c=getchar();
delchar(string,c);
printf("result:%s\n",string);
}
return 0;
}