#include<stdio.h>
main()
{
char ch;
printf("Press a key and then press enter:");
ch=getchar();
ch=ch+32;
putchar(ch);
}
这是运行的结果:
知识点:getchar()和putchar()专门用于字符的输入/输出的函数,getchar()后面没有参数而putchar()后面有参数。
#include<stdio.h>
main()
{
char ch;
printf("Press a key and then press enter:");
ch=getchar();
ch=ch+32;
putchar(ch);
}
这是运行的结果:
知识点:getchar()和putchar()专门用于字符的输入/输出的函数,getchar()后面没有参数而putchar()后面有参数。