2812 - 输入字母ASC码
时间限制 : 1 秒
内存限制 : 128 MB
输入一串字符,要求输出该字符的asc码
题目输入
一行,一串字符n,n<=250个字
题目输出
一个字符一行
输入/输出样例
输入格式
ABCD
输出格式
65 66 67 68
C++解答
#include <stdio.h> #include <string.h> #include <iostream> using namespace std; int main(){ char n[255]; gets(n); int l=strlen(n); for(int i=0;i<l;i++){ printf("%d\n",n[i]); } }