Computing Average Test Scores

guys. I am trying to write a program that asks the user how many test scores they have, then reads the test scores, averages them, then displays the average and a pass/fail grade (50+ is a pass), using a seperate function to average the input values.I have been working on it for about 3 hours now, a ...

Weird average

What's wrong with my code when i calculate the average? I set it up so average = sum of all scores divided by the number of scores.But it keeps on returning a number like 5.634543-e306 and i don't know why it's doing that.#include <iostream>#include <fstream>#include <iomanip>using ...

Average help

I am trying to take the following code so that my bottom function first pulls out the first three scores of a text file and averages them, then pulls the last three scores out and averages them. I am using a known good text file that has 7 entries with first and last name folowed by the 6 scores fol ...

Return Value with Pointers / Function Parameters

I would really appreciate if someone could tell me what is wrong with this function. When I execute the program it returns the memory address and not the calculated average. I have not included the entire program, there is a sort function and scores are entered by the user in Main. I tested Main and ...

Urgent help needed, average, highest and lowest of one-dimensional array

I have an assignment that asks :Write a program that prompts the user for test scores (doubles). The user enters -1 to stop the entry. After all of the test scores have been entered, calculate the average, the highest and the lowest test score. Use the code below as a template. Make sure you respond ...

Help with average program in C++

For this program (assignment), the user enters the names of five students, and their respective four test scores. The program will then average the scores, and display them for the user. Part of the requirement for the program is that we use five single-dimensional arrays of 'doubles' to store the s ...

Help please with Listbox total and average

there everyone. I have a problem with the JavaScript code for my aggregates workings for my course. I have worked out with some help how to input a number, click a button and get the number to appear in a listbox. I also had to get the Reset button to clear all fields including the listbox which I m ...

Please help me with accumulating scores problem.

I need to keep count of how many scores are entered using the enterButton, accumulate those scores and find the average score, best score and worst score. Without using arrays. But I'm kind of stuck. My code compiles but it doesn't run correctly. Can someone please help me?? import javax.swing.*;imp ...

$result $row average

When I run this query below:<php?$query = "SELECT gender, name, height, weight, ageFROM statisticsORDER BY gender";$result = @mysql_query($query); // Run the query$rowcount = 0;$numRows = mysql_NumRows($result);while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {echo'<table align ...

Error LNK2019

I have the following code:# include <iostream># include <iomanip>using namespace std;using std::cin;using std::cout;using std::endl;//function prototypesdouble calcAverage (double, double, double);void getTestScore(double&, double&, double&);void displayAverage (double);//mai ...

need some help on an error message

i have been working on the program, and finished debugging, but when i run my compiler to check for any mor errors i am getting 1 error that i have never seen before, and i have no clue what it means... here it isjmeyer0016@district:~/cs115b$ g++ program3.cc/tmp/ccvbPqS0.o: In function `main':progra ...

arrays and functions

I am having a huge problem with writing this program. Every time I ask the teacher for help she is too busy helping someone else. so she just tell me one thing and runs off to the next person without checking if it worked and what other help I might need. It has become very frustrating. I have been ...

Need Help With C++ Programs

This my first C++ programming class and I'm not that good with C++, so please help me out. This is due in 4 hours. This is what i got and i got a lot of errors. Thank you and once again please help me.1.Repeatedly reads a student score (for exam) and adds it to a running sum. Count the number of sco ...

Very new to programming, working on a homework problem. need help, code inside.

everyone, my name is Ryan and I am in quite a pickle. I am in a PHP class (if you want to call it that, I've learned more playing on the internet) and I am working on a group project but it would seem that we are all at a stand still. We've had about five different versions of this code now and we c ...

Help with Program Execution

Hi! I'm new to this forum and C++ programming and I am currently taking and introductory course to C++. I have a program that compiles fine but will not execute. I am posting my code and a sample input file....Please if anyone can get it to run or give me suggestions on why I am getting a segmentati ...

Compiles,works, professors says it's wrong

//This program asks the user for the number of tests, creates an array based on that response//the user enters his scores and then the program lists the scores in ascending order, finds the average//and then finds the average of the scores with the lowest one dropped#include <iostream>#include ...

compiling error

i dont know why im getting a compling error for this...error is:line 112 - name lookup of `i' changed for new ISO `for' scopingline 95 - using obsolete binding at `i'what does that even mean?!my current code is below, to get a better understanding.is this a common error? i had this error before, but ...

LISTS output is weird

this is weird to explain in the title alone, but i created a program below that works and compiles properly. it does everything i need it to do. user inputs however many scores he/she wants.6 scores get calculated for the desired calculations.if user inputs more than 6, the other scores are irreleva ...

Super Urgent! I need help. Please!

Design and implement an algorithm to solve this problem; your solution should use user – defined functions. Do not access global variables. Use parameters! (Suggestions: int function to determine lowest of two numbers, void function to print the message) Use function prototypes; the source code fo ...

Trying to obtain a number with a decimal

I am trying to write a program that takes a user submitted number of test, along with the test scores. Then I need to sort them in ascending order. (I've done all this). Now I need to get the average, but my getAvg function drops will drop the decimal and give me a whole number. What gives? Any help ...

Critique my Code!

guys, I'm currently in college for comp sci, and this is one of our homework assignments.I was looking for input on style and effectiveness, let me know if I'm starting any bad habbits that i need to stay away from, and where i stand on general knowledge of C++. This is an assignment from computer s ...

Another array question dealing with totals

My question is this, I have coded the program below to take (as a test) the scores of 3 students and 4 exams. my question is this, I need a function that can traverse the array and provide a total count of As, Bs, Cs, Ds, and Fs, by looking at the scores in the array. I'm farelly comfortable creatin ...

can som1 please explain what this script does

could someone explain what this script will do? and how it works thanks<html><head><title>Function Example</title><script LANGUAGE="JavaScript" type="text/javascript">function Average(a,b,c,d) {result= (a+b+c+d)/4;return result;}</script></h ...

Rounding Problem

Heres my problem:I created a method that returns a handicap in integer form. Before you can return it, however, you must cast it as an int. My problem arises in some cases where the handicap returned is 1 too high. I'm wondering where my logic may be wrong in some cases; so far.. I can't find the pr ...

This program is hard on a beginner...

//Use pointer to array to pointers function to use a menu driven interface.// The program should use the given five option menu. One restriction on using array to pointer is that all the pointers must have the same type. The pointer should befunction of the same return type that recieve arguments of ...

need help with an array...

all, im having trouble figuring out how to add up all of the elements in an array... first of all here is my assignment... im basically prompting for 4 sets of data (name, ID, score, and grade) each set will create its own array. I also need the class average, which is where i am having trouble. to ...

Error message C++

i need help with my programi dont want use arraysi wanna use function sif you also have ideas to write the code shorter/easier please tell methanks for your helperror message:c++ test.cpp(99) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition//C++ progr ...

New to JavaScript!!! HELP!

I am new to arrays, and JavaScript all together. Can I get some input on what I messed up on in this following code:<html><!-- grades.html --><!-- This page utilizes the ParseArray function to store an array of numbers and --><!-- compute their average. This page also determines ...

Procedure for MAX/MIN

:lol: What the procedure/function for working out the biggest/smallest result?This is the program i am trying to do..and i am supposed to show the user the highest student mark, and the lowest student mark, but i don't know how to.........argh!"Please Help!:eek: program ftn_marks;{$APPTYPE CONS ...

Grade program

Write a program that will compute the quarter/semester grader for all the students in a class. Scenario is as follow: There are total of forty students in any given class. Each student has twelve graded items. Each student is given four tests, four programming assignments, and four homework assignme ...

Sum of Vectors

In my Java class, we have to randomly create basketball teams and random scores, then average the scores for each team, and average the scores for each game. I am not sure how to average the score for each game, meaning adding scores vertically in a vector versus adding scores horizontally. I have t ...

I need some help. its an easy problem but...

I have been writing my program and everything works like it should unless the user inserts a character then the whole thing blows up... how can I fix this. Is there something I can add to block characters from being added? any help would be appreciated!here is my code:#include <iostream>using ...

numpy + MA, problem with min and max on masked arrays

I am using Python 2.4.4 and:from numpy import *from MA import *I am using masked data in arrays and functions: average, min and max.When the last item of an array is masked, I am getting "masked" resultsfor min and max functions,even if there are still valid items elsewhere in the array.Fu ...

Help with code about highest & lowest score in loops

Can anybody help me figure out how to fix this so it would come out the highest & lowest score???[code]:#include <iostream>#include <iomanip>using namespace std;int main(){double *score;double total = 0;double average;double max = 0;double min = 0;int testscore;int count = 1;cout ...

Help with code about highest & lowest score in loops

Can anybody help me figure out how to fix this so it would come out the highest & lowest score???:#include <iostream>#include <iomanip>using namespace std;int main(){double *score;double total = 0;double average;double max = 0;double min = 0;int testscore;int count = 1;cout << ...

what does this do

I'm trying to find the most common color in an image giving my application the ability to search by color. I was searching php.net for something that would tell be the rgb values for each pixel of the image which i found as imagecolorat(). A little ways down someone wrote a function that finds the m ...

Newbie Here - need help

I'm brand new to scripting and starting with Javascript. I'm using an old book because it's all I've got (so I'm not asking for comments on the Javascript 1.5 style). I'm editing and trying to modify a script from the textbook I am using. The main thing I want to know is why this script is returning ...

need help on two-dimensional arrays...please help..

uhm... i really need your help about this... below is the problem but i have my own turbo C code. and the problem in my code is that i cannot total and average the scores that i restore in my arrays...write a program that will process the exam scores of students in a exam.here are the requirements:- ...

displaying the results

Okay, so I have my program almost complete. I can get it to do everything except use the computeAverage. I know it works because if I hard code the arrays, I can utilize that and it will work. However, I am having to utilize what I pull from a .txt file and I can't figure out quite yet how to comput ...

I do not know why this code does not work. can someone please help

//This function prints all scores, but if a score occurs more than once, it only prints it one timevoid scores_once(int x[20], int size, int new_array[20]){for(int i=0; i<size; i++){new_array[i]= -1;}new_array[0]= x[0];cout<<new_array[0]<<endl;for(int j=1; j<size; j++){for(int k=0; ...

ok been rewriting this for a week now for homework

ok prof in college asked us to write a program for a simple gradebook.iv wrote it 3 times and still cant get it right.he wants it to be able to put in 10 names/ids and 10 grades,and get a listing of those grades getting an average.im butchering this thing and getting no where.this is how far iv gott ...

I need help!!!

My teacher gave us an assignment where she wanted us to write a program that would read test score data from a text file,drop the lowest test score,average the other three test scores, and output the data to a text file. I've spent three days trying to figure out how to drop the lowest test score. M ...

Cant get school project done right.

Assignment:2. Write a menu driven program to execute the given class.A. To search for student by name. If the student does not exist, appropriate message should be given.B. To display the details of the student having greatest average.C. To display the details of all the students.The class student h ...

I'm having trouble understanding this

I am trying to finish up my homework but I don't really understand the questionConsider the array temps that the following statements define:typedef double WeekType[DAY_PER_WEEK];typedef WeekType YearType[WEEKS_PER_YEAR];YearType temps;temps[12] is a one-dimensional array of seven real numbers. Supp ...

Also need help with coding for a test score calculator.

I have the same assignment someone else ask help with. The assignment calls for a test score calculator that calculates and displays the score total, score count, and average score. If the user clicks the Display scores button, the application sorts the scores and displays them in a message box. The ...

Problem with array....

What I'm trying to do is to take 7 of the scores from judges and discard the lowest and the highest score then average five scores that remain after.I got to where I can get all of the scores, but I have no idea how to take the lowest and highest score and discard them.Please help me..Thank you! imp ...

Simple Output Anamoly

This program is to calculate the average, high and low score of a series of use inputs. The output I am getting is high, low, average, high, low. I have no idea why or how this can happen. Side note, I am aware the coding isn't very good but the program otherwise works.int main () // calculates test ...

Need help fixing my problem

This is what I am suppose to do: Write a program that maintains a high score table of five entries, where each entry is made up of a player's name and score. The table should store the entries in order, from highest score to lowest. Your program should initialize the table using your name and 1000 f ...

An issue concerning dates/time

all. I've been working on some code for a few weeks now and it has shaped up fairly well and does what I need it to do for the most part. I have run into an issue that I failed to take into account initially. With that said, let me go ahead and give you some info on what my code does. The code loads ...

Inadvertent looping!

I'm a beginning student. Can someone tell me why this is looping each name for 3 rows in a list box? The file it's reading from is at the bottom.Thanks'DECLARE VARIABLESDim names(5) As StringDim SCORES(5, 2) As IntegerDim row, col As IntegerDim ave(5) As DoubleDim grade(5) As StringDim sum As Intege ...