您需要删除样式中的空白(空格和\n
)scanf
,"%d"
而不是" %d\n"
。
#include <stdio.h>
int main(void)
{
int ascii;
printf("Enter an ASCII value: ");
scanf("%d", &ascii);
printf("The %d ASCII code has the character value %c\n", ascii, ascii);
return 0;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句