Question: C++ PROGRAM I just need some additional code on my program, i need to show the bytes on each number. OUTPUT ON MY PROGRAM, NUMBER

C++ PROGRAM

I just need some additional code on my program, i need to show the bytes on each number.

OUTPUT ON MY PROGRAM, NUMBER OF BYTES MUST SHOW AFTER THE * (asterisk)

C++ PROGRAM I just need some additional code on my program, i

need to show the bytes on each number. OUTPUT ON MY PROGRAM,

CODE:

#include #include #include #include using namespace std; // Ask user for filename and open it for reading in binary mode void inputFileDetails(ifstream &ifs) { string fn; cout> fn; ifs.open (fn, ios::in | ios::out | ios::binary); if (!ifs.is_open()) { cout max) max = counters[i]; } void displayDistribution(int counters[],int max) { // Plot the distribution after applying scaling for (int i = 0; i

} int main() { string fn; int counters[256], max = 0, totalbytes = 0; // keep track of how many of each char (0 to 255) in counters for (int i = 0; i

//call functions inputFileDetails(ifs); countTotalBytes(ifs,counters,totalbytes); findMax(counters,max); displayDistribution(counters,max); displayStatistics(max,totalbytes); return 0; }

* ********* Enter filename: C:\Users\Acer\Desktop\1.png a ******************************************* 1 ******************** 2 *************************** 3********************* 4 ******************************* ************************ S ********************** 9 ************************** L 8 ***************************** ************************** 6 **************************** L 11 ************** 12 ************************** 13***************** 14 *************************** 15 ****** 16 **************************** **************************** LL ******************************* L **************************** 6L ******************************* 21 *************************** 22 ************************** 23 **************** 24 25 ************************* 26 *************************** 27 ***************** 28 ******************** 29 ****************** 38 ******************* 31 ***************** 32 33 **************** 34 ******** 35 ***** * * 36 ******************************* 37***************************** 38 **************************** 223 ******************************* 224 *************************** 225 ***************************** 226 **************************** 227 ********************************* 228 ************************** 229 **** 230 ********************************* 231 **** 232 233 ******************************** 234 ************************** 235 236 **************************** 237*************************** 238 ********************************** 239 ******************************* 248 ******* 241 ****************************** 242 ****************************** 243 ********************************** 244 ************************* 245 ***************************** 246 ***************************** 247 ******************************** 248 *************************** 249 ******* 250 251 ******************************* ***************************** ZGZ ********************************* ESC ******************************** S ****************************** SSZ Max count: 3867 Legend: * = 39 bytes Total:284933 Process returned o (Oxo) execution time:27.664 s Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!