A sum is the total of all the numbers in the list. To find the sum, add all of the numbers. For example 2+4+8+10=24. 24 is the sum.
AVG is short hand for average. An average is typically found by taking the sum of all the data and then dividing by the number of items in that list. So using our previous example, you would take our sum 24 and divide it by 4 because there were four different numbers. The average would be 8.
Range is the difference between the biggest number and the smallest number. So you would take 10 - 2 and your range would be 8.
No, a sum of averages is NOT as accurate as the average of the whole. For example: A=avg (1,10) = 5.5 B=avg (1, 1, 1, 1, 1) = 1 avg(A,B) = 3.25 [Average of averages] avg(1,1,1,1,1,1,10) = 2.29 [The original data set]
main() { sum=0; float avg=0.0; int sqr[10]; for(i=1;i<=10;i++) { sqr[i]=(i*i); } for(i=1;i<=10;i++) { sum=sum+sqr[i]; } avg=sum/10; dts it !!!
1. start 2. sum=0 3. input n 3. for i=1 to n do 4. input x 5. sum=sum+x end of for (3) 6. avg=sum/n 7. output sum, avg 8. stop
/*mycfiles.wordpress.com To Calculate Sum & Average of 4 no.*/ #include<stdio.h> #include<conio.h> void main() { float a,b,c,d,sum,avg; clrscr(); printf("Enter the 4 nos.\n\n"); scanf("%f%f%f%f",&a,&b,&c,&d); sum=a+b+c+d; avg=(a+b+c+d)/4; printf("\nSum is= %f\nAverage is= %f",sum,avg); getch(); }
Add the numbers together (sum) and divide by two (average). SUM: 2 + 8 = 10 AVG: 10 / 2 = 5
No, a sum of averages is NOT as accurate as the average of the whole. For example: A=avg (1,10) = 5.5 B=avg (1, 1, 1, 1, 1) = 1 avg(A,B) = 3.25 [Average of averages] avg(1,1,1,1,1,1,10) = 2.29 [The original data set]
#include <iostream> using namespace std; int main() { double num[100], avg, sum=0; int i, n; cout<<"Enter amount of numbers "; cin>>n; for(i=0;i<n;i++){ //This for loop adds the numbers as they are entered cout<<"Enter a number: "; cin>>num[i]; sum+=num[i]; } avg=sum/n; cout<<endl<<"The sum is "<<sum<<endl; cout<<"The average is "<<avg; system("pause"); return 0; }
import java.io.*; class summ { public static void main()throws IOException { BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); int a[]=new int[10]; int sum=0; float avg=0; for(int i=0;i<10;i++) { System.out.println("Enter marks of student "+(i+1)+" : "); a[i]=Integer.parseInt(in.readLine()); sum+=a[i]; avg=sum; } avg/=10; System.out.print("Sum= "+sum+"\nAverage= "+avg); } }
main() { sum=0; float avg=0.0; int sqr[10]; for(i=1;i<=10;i++) { sqr[i]=(i*i); } for(i=1;i<=10;i++) { sum=sum+sqr[i]; } avg=sum/10; dts it !!!
public class Test { public static void main(String[] args){ int i = 500; int sum = 0; int avg = 0; int counter = 0; do { i = i + 5; sum = sum + i; counter = counter + 1; } while (i <= 600); System.out.println("Sum: " + sum); avg = sum/counter; System.out.println("Average: " + avg); } }
main(){int n,a[i],s;s=0;printf("enter no of elements in array");scanf("%d",&n);printf("Enter elements in array");for(i=;i
1. start 2. sum=0 3. input n 3. for i=1 to n do 4. input x 5. sum=sum+x end of for (3) 6. avg=sum/n 7. output sum, avg 8. stop
avg has a wide range of uses thats y is so easy o use
/*mycfiles.wordpress.com To Calculate Sum & Average of 4 no.*/ #include<stdio.h> #include<conio.h> void main() { float a,b,c,d,sum,avg; clrscr(); printf("Enter the 4 nos.\n\n"); scanf("%f%f%f%f",&a,&b,&c,&d); sum=a+b+c+d; avg=(a+b+c+d)/4; printf("\nSum is= %f\nAverage is= %f",sum,avg); getch(); }
Add the numbers together (sum) and divide by two (average). SUM: 2 + 8 = 10 AVG: 10 / 2 = 5
4.2 to 5.4 million/uL
The avg. salary would be about $65,270 annually.