subject

You are given an encoded message containing only numbers. You are also provided with the following mapping: A : 1
B : 2
C : 3 ...
Z : 26

Given an encoded message, count the number of ways it can be decoded.

Input: Your program should read lines from standard input. Each line contains an encoded message of numbers. You may assume that the test cases contain only numbers.
Output: Print out the different number of ways it can be decoded. Note: 12 could be decoded as AB(1 2) or L(12). Hence the number of ways to decode 12 is 2.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:30
Write a program that inserts the digits of an integer into an array in originalorderfollowed by reverse order. first, promptthe user to enter a positive integer(> 0). determine the number of digits of the integer. create a dynamically allocated integer arrayof a size twice the number of digits.now insert the digits in original order which will occupy half of the array. then, insert the digits in reverse order.finally, output thedigits in thearray.use at least two functions to organize your program.
Answers: 3
question
Computers and Technology, 24.06.2019 07:30
Consider the folloeing website url: what does the "http: //" represent? a. protocal identifier. b. ftp. c. domain name d. resource name
Answers: 2
question
Computers and Technology, 24.06.2019 15:30
If you want to delete an entire word at a time, which key should you press along with the backspace or delete key?
Answers: 1
question
Computers and Technology, 25.06.2019 02:00
Software and services are used to conceive, plan, and execute projects in any field. these tools are excellent methods of increasing the probability of successful projects. open source linux project management mind-mapping
Answers: 2
You know the right answer?
You are given an encoded message containing only numbers. You are also provided with the following m...
Questions
question
History, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Social Studies, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
History, 14.09.2020 16:01
question
Computers and Technology, 14.09.2020 16:01
question
English, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Geography, 14.09.2020 16:01
question
Mathematics, 14.09.2020 16:01
question
Biology, 14.09.2020 16:01
Questions on the website: 13722367