题目描述

Here is a peek ahead. In this chapter you learned about integers and the type int. C++ can also represent uppercase letters, lowercase letters and a considerable variety of special symbols. C++ uses small integers internally to represent each different character. The set of characters a computer uses and the corresponding integer representations for those characters are called that computer’s character set. You can print a character by enclosing that character in single quotes, as with
cout << 'A'; // print an uppercase A
You can print the integer equivalent of a character using static_cast as follows:
cout << static_cast< int >( 'A' ); // print 'A' as an integer
This is called a cast operation (we formally introduce casts in Chapter 4).
When the preceding statement executes, it prints the value 65 (on systems that use the ASCII character set). Write a program that prints the integer equivalent of a character typed at the keyboard. Store the input in a variable of type char. Test your program several times using uppercase letters, lowercase letters, digits and special characters (like $).


输入格式

A line that contains one character


输出格式

Prints the integer equivalent of a character typed at the keyboard


样例数据

输入

$

输出

$'s integer equivalent is 36

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解