77问答网
所有问题
当前搜索:
二维字符数组输入输出
...分别用以完成一
字符串 数组的输入输出
排序 写出函数使其运行_百度...
答:
include <stdio.h>void change(char *n,int N){ char temp;int i;for(i=0;i<N-1;i++){ for(int j=N-1;j>i;j--){ if(n[j]<n[j-1]){ temp=n[j];n[j]=n[j-1];n[j-1]=temp;} } } }void main(){ char ch[4];gets(ch);change(ch,3);puts(ch);} ...
键盘
输入
一个
字符串
x,在str
数组
中查找,如果查找到,则
输出
。。。
答:
Flag=1;就是判断str[i]与x是否相同,相同就置标志为1退出循环,否则就继续进行 我试运行了你的程序是对的,应该没问题的
用
数组
,功能是:从键盘上
输入
50个
字符
,统计其中英文字符,空格字符,数字...
答:
include<stdio.h> include<stdlib.h> include<string.h> int i,a[4];char t;int main(){ for(i=0;;i++){ scanf("%c",&t);if(t=='\n')break;else if(t>='A'&&t<='Z') a[0]++;else if(t>='a'&&t<='z')a[0]++;else if(t==' ')a[1]++;else if(t>='0'...
棣栭〉
<涓婁竴椤
62
63
64
65
66
67
68
69
70
76
其他人还搜