Question about Microsoft Computers & Internet

1 Answer

How to compute a class average using arrays - Microsoft Computers & Internet

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that gotĀ 5 achievements.

    Sergeant:

    An expert that hasĀ over 500 points.

    Champion:

    An expert who has answered 200 questions.

  • Expert
  • 219 Answers

Hi, here is the program #include<stdio.h> #include<conio.h> void main() { int class[30],i; float sum=0,avg=0; printf("enter marks"); for(i-0;i<30;i++) scanf("%d",&class[i]); for(i-0;i<30;i++)
sum+=class[i]; avg=sum/30; printf("%f",avg); getch(); }

Posted on May 08, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Write a program c that declares an array of 100 elements to hold these values. Read the values in from the file and store them in successive elements of the array. Keep track of how many numbers are read...


That appears to be an intermediate question in a programming class. Best read the book, the answer is not what is important the process of getting the answer is what you are trying to learn.

May 17, 2017 | Office Equipment & Supplies

1 Answer

The following frequency distribution analyzes the scores on a math test. find the indicated class midpoint or boundaries. 40-55 2 60-75 4 76-82 6 83-94 15 95-99 5


Midpoints ( x + y)/2 = x47.567.57988.597

Boundaries for lower class -0.5 and +.0.5 for upper.39.5 - 55.559.5 - 75.575.5 - 82.582.5 - 94.594.5 - 99.5
I just don't get how the number of students factor in? It's still an average.

Oct 11, 2012 | Computers & Internet

1 Answer

This is an illustration of use of classes in php please tell me do i need to put the classes in seperate php file and the objects in seperate file or in other words for the below example how many seperate...


Everything can be in the one file if you want, but that doesn't help with segregation of logic from the presentation layer (i.e. what you see on screen).

Personally I'd put my core class libraries in one or more files and include() them. And I'd probably put any extended classes in separate files and include() them additionally.

include ('library.class.php');
include ('extended.class.php');

Oct 14, 2009 | Computers & Internet

2 Answers

Merging two arrays and sort them


NEED A NEW KEY THE ONE ON THE BOX WONT WORK

Jul 29, 2009 | Microsoft Windows XP Professional With...

1 Answer

I am java beginner and I want a help in writing a java program to calculate the variance for an array of numbers


the best thing to do here is to separate the steps for calculating the variance into different functions. To compute the variance the first thing to do is to compute the mean or the average of the numbers in the array. so your first function will loop through each of the numbers and divide it by the length of your array. the output is the returned. The next thing to do is create another function for the variance. loop through each of the numbers again and subtract to each number the mean. square the value then add to the previous. so that means you have another variable that starts from zero and just adds the answer. after that divide it by the length of the array again and what you are going to get is the value for the variance.

May 13, 2009 | Computers & Internet

1 Answer

A Program using an array that culculates the sum and average of the five input values?


Hi,
I am writing in C code here
#include<stdio.h>
#include<conio.h>
void main()
{
int a[5],i,sum=0;
float avg=0;
printf("enter the five values");
for(i=0;i<5;i++)
scanf("%d",&a[i]);
for(i=0;i<5;i++)
sum+=a[i];
printf("Sum=%d",sum);
avg=sum/5;
printf("Average=%f",avg);
getch();
}

Mar 18, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

To merge two arrays A and B in java source code.


Do you need them to be sorted after the merge and are they already sorted? If not, then what you can do is create a temporary third array which will set the half of third array equal to the first array, and then set the set half equal to the second array. If they need to be sorted, I can help too but you need to tell me

public class ArrayMerge
{
public static int arr1[] = new int [20];
public static int arr2[] = new int [20];

public static void main()
{
setScores(arr1);
setScores(arr2);
printScores(arr1);
printScores(arr2);
printScores(merger(arr1,arr2));
}

public static void setScores(int a[])
{
for(int x = 0; x<a.length; x++)
{
a[x]= (int)(Math.random() * 100)+1;
}
}

public static void printScores(int a[])
{
for(int x = 0; x<a.length; x++)
{
System.out.print(a[x] + " ");
}
System.out.println();
}

public static int[] merger(int a1[], int a2[])
{
int a3[] = new int [(a1.length + a2.length)];

for(int x = 0; x<a1.length; x++)
{
a3[x]=a1[x];
}

for(int x = 0; x<a2.length; x++)
{
a3[x+a2.length]=a2[x];
}
return a3;
}
}

Jan 24, 2009 | Microsoft Windows XP Professional With...

2 Answers

Excel will not displaying the results of a trend array formula


Hi Griffnz,

Your "known Y's" or 'values' are in Column B. This is the first array in the Trend formula.

Your "known X's" or 'months' are in Column A. This is the second array in the trend formula.

The trend formula is supposed to give you a projection of what the rest of the values in Column B will be over the next few months (usually continuing cells in Column A). The cells you want these values to show up in represent the third array in the formula.

Thus, your formula should look more like: '=trend(B3:B14,A3:A14,A15:A18)'

However, your formula is leaving out The values in B and adding values from C - -- but there ARE no values in C. Apparently, C is where you want the values to appear. In that case, the C array would be the third array in your formula. This would look more like '=trend(B3:B14,A3:A14,C3:C14)

If this doesn't make sense, let me know.

Sep 30, 2008 | Microsoft Excel for PC

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

117 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2720 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18391 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...