牵连到指针问题,指针还没学

include <stdio.h>

include <string.h>

int main()
{
char ch[100];
printf("please input char:\n");
for (int i = 0; i < 100; i++)
{
scanf_s("%c", ch[i]);
}
for (int i = 0; i < 100; i++)
{
if ('a' <= ch[i] && ch[i] <= 'z')
{
ch[i] = ch[i] - 32;
}
else if ('A' <= ch[i] && ch[i] <= 'Z')
{
ch[i] = ch[i] + 32;
}
}
for (int i = 0; i < 100; i++)
{
printf("%c", ch[i]);
}
return 0;
}

回答

问题补充:

必须用scanf printf 输入输出

以上是牵连到指针问题,指针还没学的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>