+ 1
WAP in C to calculate central tendency mean mode median of of an array of size 25
If more than one elements occurs most often in the array, then the mode will be the element that is the greatest among all of them. https://code.sololearn.com/cm8S4o7c1ctB/?ref=app https://code.sololearn.com/c232U5WLPpE7/?ref=app
8 Antworten
+ 1
Shekhar Rajbhar
Attempts?
+ 1
There are several issues: not initialized variables, spelling errors, using an int for mean...
I recommend you to test your code with a pre-defined, short array, not with long user input.
I made comments in the code, please review it:
https://code.sololearn.com/cjdtCjN8l87r/?ref=app
+ 1
Try to 1st make a working code before you start to rewrite code or remove function.
For the execution speed, I don't think that 25 values and few function are an issue. Also consider clarity and reusability – functions are great for that.
0
Strange, I could have sworn someone had posted a similar question a few hours ago...
As already mentioned: Please show what you have tried to solve the task. Do not expect other people to do your homework for you. If you want to revise the basics before doing the task, check on the sololearn C course.
0
ohh sorry that's was me
0
Actually I haven't mention full prob
I find out mean and median but i am stuck in finding the largest mode from the multiple modes
0
Please link your code so we can see where exactly you are stuck.
You may also like to look at how others approach the task:
https://www.sanfoundry.com/c-program-find-mode-array/
https://www.tutorialspoint.com/learn_c_by_examples/mode_program_in_c.htm
0
Thankyu maam because of you I succeed