subject

The coding language is c++, thank you so much! A sequence of character values representing the message to be compressed. The maximum number of characters in the input message is 100.
Example: 2020cccbbba
Note: You must use a static array of characters to store the input message.
Output:
The input message (character array).
The number of symbols in the alphabet (integer value).
The symbols in the alphabet (characters separated by a comma). You must print the alphabet's characters based on
the order they appear in the input message.
The number of bits per symbol (integer value). To calculate the number of bits used per symbol, you will use the following formula: ceil(log2(number of symbols in the alphabet)).
A histogram showing the frequency of the symbols in the message (see the example below). You must print the information about the frequency of the symbols in the alphabet sorted in increasing order by their first appearance in the input message. Given the previous input, the output of your program must be:
Message: 2020cccbbba
Number of symbols in the alphabet = 5
Characters in the alphabet = 2,0,c, b,a
Number of bits per symbol = 3
Histogram showing the frequency of the symbols in the alphabet
2 | **
0 | **
c | ***
b | ***
a | *
NOTES:
You can only use conditionals, loops, and arrays when writing your solution. Using strings will translate into a 100% penalty for your solution.
The input message may have white spaces. Consider using getline instead of cin when writing your solution.
You must include the cmath library to use the ceil function and the log2 function

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What operating system is a smartphone most likely to use? 1.bsd 2.mac os x 3.symbian 4.linux
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
You know the right answer?
The coding language is c++, thank you so much! A sequence of character values representing the mess...
Questions
question
Mathematics, 03.08.2019 16:00
question
Mathematics, 03.08.2019 16:00