字母转换成ASCII码

//顺序结构及流程 

#include"stdio.h"             /*编译预处理命令*/ 
void main()                   /*main函数*/
{
    char ch;                                        /*定义字符型变量*/
    printf("Please input a letter:");/*输出提示信息*/
    ch=getchar();                                            /*从键盘获取一个字符并保存*/
    printf("%d",ch);                                    /*格式化输出,十进制*/
        
    } 
    //这个呢,只是最后输出格式那里搞了点东西。 

猜你喜欢

转载自blog.csdn.net/l15970940509/article/details/83831741