Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have created a mode function in C++ To determine the mode of an array My only problem is, when there is no mode, ie:
I have created a mode function in C++
r monday Project tracking, teamwork & client report Run O Debug return Sum / size; /Ifunction definition for mode //this function will only find a mode if the //if there is no mode, it will not return a double mode (int *array, int size) int Mode, Most, Count; Count Most e.0 for (int i 6.0; i To determine the mode of an array
My only problem is, when there is no mode, ie: the I put is: 2, 3, 4, 5
It returns some crazy number
I need to add to my function but am unsure of what to do
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started