answersLogoWhite

0

By writing in C code the mathematical methods for finding the mean, median and mode of your data taking into account how your data is stored (eg an array; two separate arrays one with data and the other with frequencies; a two dimensional array containing both data and frequencies; an array of structures containing the data instead of arrays; a linked list of structures; etc).

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

C program to find the mean median mode?

try this---> http://c-pgms.blogspot.com/2008/08/program-to-find-meanmedianand-mode_22.html


Which statistic is misleading in the following set of test scores 2 85 87 88 89 A. upper quartile B. mode C. mean D. median?

The statistic that is misleading in this set of test scores is the mean (C). The mean is calculated as (2 + 85 + 87 + 88 + 89) / 5 = 50.2, which does not accurately represent the overall performance of the students due to the outlier score of 2. In contrast, the median (88) and mode (85) provide a better indication of the central tendency of the majority of the scores.


What five numbers have a range of a mean of 6 a mode of 3 and a median of 5?

Before I start, you didn't put the range, so I can't completely find the answer. If you can give me the range, I can edit this to make it 100% correct The Median is the "Middle number", so we know that the middle number is 5 ab5cd The mode is the number that is repeated most often, and since it is 3, we know that there has to be two 3s, in order to have more 3s than 5s. (We can't have more or else 5 would be the median) 335cd the mode is the average of all of the numbers (3+3+5+c+d)/5=6 now we just need to do simple math to find C and D 11+c+d=30 C+D=19 The Range is the biggest number minus the smallest number (D-3) If you know the range, you can calculate D, and then find C using C+D=19


Write a c program to print mean median and mode?

#include<stdio.h> #define MAXVAL 1000 void sort1(int a[],int n); void median(int a[],int n); void mode(int a[],int n); int main() { int n; int arr[MAXVAL]; int i; printf("Enter the number of elements:"); scanf("%d",&n); printf("Enter the values:"); for(i=0;i<n;i++) { printf("a[%d]=",i); scanf("%d",&arr[i]); } sort1(arr,n); median(arr,n); mode(arr,n); } void sort1(int a[],int n) { int i; int j; int temp; for(i=0;i<n;i++) { for(j=i;j<n;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } } void median(int a[],int n) { int median; int mid; if((n%2)==0) { mid=n/2; median=(a[mid-1]+a[mid])/2; } else { mid=(n+1)/2; median=a[mid-1]; } printf("The median is:%d\n",median); } void mode(int a[],int n) { int i; int count1[MAXVAL]; for(i=0;i<n;i++) { count1[i]=0; } for(i=0;i<n;i++) { count1[a[i]]++; } i--; int mode=count1[0]; int j; int k; int flag=0; for(j=0;j<=a[i];j++) { if(count1[j]>count1[mode]) mode=j; } for(j=0;j<=a[i];j++) { for(k=j+1;k<=a[i];k++) { if(count1[j]=count1[k] && count1[j]>count1[mode]) { flag=1; } } } if(flag==1) { printf("Mode cannot be calculated"); } else printf("the Mode is:%d",mode); }


How we can solve the equation for two or three unknown in C programming language?

Just as you would do it manually, I mean there is no predefined 'solve_equation' function in C.

Related Questions

Which measure would best to use in determining how much money customers usually spend a. range b mode c. median d. mean?

The median.


Is useful when the most common item characteristic or value of a data set is required a The mode b The median c The mean d None of these?

The mode


Write a C plus plus to find median and mode of a number?

The median and mode of any number is the same number. The mode of 5 is 5, as is the median of 5. In other words, you need two or more numbers to determine the median and mode of those numbers.


C program to find the mean median mode?

try this---> http://c-pgms.blogspot.com/2008/08/program-to-find-meanmedianand-mode_22.html


What are the different modes in C programming language?

In C programming language, there are three main modes: text mode, binary mode, and append mode. Text mode is used for reading and writing text files, binary mode is used for reading and writing binary files, and append mode is used for appending data to the end of a file.


What do you mean by c language?

C is a programming language.


What does the hashtag mean in programming?

In programming, specifically in C and C++, the hashtag (#) is used to include files into the main program and to create macros.


Which statistic is misleading in the following set of test scores 2 85 87 88 89 A. upper quartile B. mode C. mean D. median?

The statistic that is misleading in this set of test scores is the mean (C). The mean is calculated as (2 + 85 + 87 + 88 + 89) / 5 = 50.2, which does not accurately represent the overall performance of the students due to the outlier score of 2. In contrast, the median (88) and mode (85) provide a better indication of the central tendency of the majority of the scores.


What do you mean by non primitive data structure in C programming?

What do you mean by searching in data structure in C.?


How do you calculate the mean from the median?

The mean is the sum of the sample, divided by the number of samples. The median is the middle number. Good example of this is your grades. You have a d,c,a,b, c,c. Each grade has a number a d is equal to 1 point, c= 2 points, a= 4 points, and a b=3 points. You add these up and divide by the number 7. To find the median write them in order A,b,ccc,d= the median is a C.


What are the colors in C programming language?

What exactly do you mean by colors?


C what does it mean?

Hundred Carbon A vitamin A programming language ...