#K38632. Print Characters with ASCII Values
Print Characters with ASCII Values
Print Characters with ASCII Values
Given a string, output each character along with its ASCII value on a new line. For each character (c) in the string, print a line in the format c: ascii_value
, where ascii_value
is the ASCII code of (c). This problem requires reading input from standard input (stdin) and printing the result to standard output (stdout).
inputFormat
The input consists of a single line containing the string. The string may include letters, digits, special characters, or even be empty.
outputFormat
For each character in the input string, output a line in the format character: ascii_value
. If the input string is empty, no output should be produced.## sample
hello
h: 104
e: 101
l: 108
l: 108
o: 111
</p>