现在的位置: 首页 > 综合 > 正文

输出所有大写字母和他们所对应的ACSII码

2014年01月10日 ⁄ 综合 ⁄ 共 144字 ⁄ 字号 评论关闭

#include "stdafx.h"

int main(int argc, char* argv[])
{
 int ch;
 for(ch='A';ch<='Z';ch++)
 printf("字母%c的ACSII码值是:%d/n",ch,ch);
 return 0;
}

//字符在内存中先转为整数在进行运算。

抱歉!评论已关闭.