如何打印数字的ASCII码?用for打印从1到九的,怎么弄啊?
定义char变量,然后用%d输出
#include <stdio.h> int main() { char c; for(int i=1;i<10;i++) { c = '0' + i; printf("%d ",c); } }