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, 22.06.2019 11:30
Andrina writes letters that are regularly sent to hundreds of her company’s customers. because of this, she would like for the mail merge command to be in her quick access toolbar, and she wants it to be the first button on the left. what should andrina do to place the mail merge button there?
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
You know the right answer?
The coding language is c++, thank you so much! A sequence of character values representing the mess...
Questions
question
English, 03.03.2020 20:52
question
Computers and Technology, 03.03.2020 20:52
question
English, 03.03.2020 20:52
question
Mathematics, 03.03.2020 20:52
question
World Languages, 03.03.2020 20:52
Questions on the website: 13722367