游客 Signup | Login
中文 | En

3228 - 例题3-3 大小写字母转换(2)

从键盘上输入一个大写字母,要求用小写字母输出,同时输出该小写字母对应的ASCII码。

Input

大写字母

Output

第一行输出小写字母,第二行输出小写字母对应的ASCII码,注意最后的换行符。

Examples

Input

A

Output

a
97

Solution C

#include<stdio.h>
int main()
{
	char c='A';
	printf("%c\n%d\n",c+32,c+32);
    return 0;
}

Solution C++

#include<iostream>
using namespace std;
int main()
{
char a,b,c;
int d,e,f;
cin>>a;
d=(int)a;
d=d+32;
b=(char)d;
cout<<b<<endl<<d<<endl;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题