473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Calculation of averages

i need to calculate the average of the class by taking info of 3 students midterm and final grades to find who passed and who failed show which one got highest and lowest mark midterms percentage is%40 final is%60 if the average grade of a student is 50 he or she will pass.. if someone who got below 50 in final will fail directly.. how can i write this programme
Mar 21 '07 #1
9 2117
Roonie
99
well . . . how will you store the data you need to process?
Mar 21 '07 #2
just by entering the values i mean i will enter values for mid. final then do the calculation and get the result who passed and failed
Mar 21 '07 #3
anyone plz help its soooo urgent i need to calculate the average of the class by taking info of 3 students midterm and final grades to find who passed and who failed show which one got highest and lowest mark midterms percentage is%40 final is%60 if the average grade of a student is 50 he or she will pass.. if someone who got below 50 in final will fail directly.. how can i write this programme

--------------------------------------------------------------------------------
Mar 21 '07 #4
Banfa
9,065 Expert Mod 8TB
Firstly please don't double post your question, please do read the Posting Guideline in the FAQ.

For each student you need to get the mid-term and final mark, and using these marks work out if they have passed or not.

The first step is to work out how you would do the calculation in a specific case on paper.

The second step is to generalise that to a calculation for any case.

The third step is to convert the generalise algorithm to usable C code.
Mar 22 '07 #5
Roonie
99
i mean, will you be using ints?

how many do you need? what will you call them? you will be setting their values from cin?

we wont write a program for you, but we can help you in the right direction.
Mar 22 '07 #6
float ,3,from cin
Mar 22 '07 #7
Roonie
99
ok, so you have so far
Expand|Select|Wrap|Line Numbers
  1. float x, y, z;
and
Expand|Select|Wrap|Line Numbers
  1. cin >> x >> y >> z;
what calculations do you need to perform to get the right information?
Mar 22 '07 #8
i gotta take the averages that i expained above %60 of the final %40 of the than take the class average to decide who pass and who failed..
Mar 22 '07 #9
Roonie
99
so im assuming that either x, y or z will be the midterm and another one will be the final grades? maybe another one will be the result?

how would you write a statement to perform this arithmetic and store the answer in the appropriate place?

(you have to be trying on your own here, not just telling me what you need to have in the end.)
Mar 22 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jeff Blee | last post by:
I am hoping someone can help me. I am making a Access 97 app for a person and have run up against a problem to do with MS Graph. There is a table that has a number of data elements and a date field...
1
by: Kat | last post by:
I have a report in Access that calculates the average of a column of numbers (C3) . I want to add the stipulation that if C3's totals are zero, to not print anything in that field. The current...
4
by: david.monaghan | last post by:
I have a table with the following fields - Location, Manager, CostCentre, Month and Headcount. What I am trying to do is a monthly rolling average headcount by Location, Manager, CostCentre. To...
9
by: falcon | last post by:
Is there a way I can do time series calculation, such as a moving average in list comprehension syntax? I'm new to python but it looks like list comprehension's 'head' can only work at a value at...
3
rdscott
by: rdscott | last post by:
Access 2003 I have several fields in a table that I want to sum, get an average and update the avg value in another field. This is for each record. If anyone can help, what is the best way of...
3
by: ken.ditto | last post by:
I have a database that stores data collected from a variety of instruments (pressure, temperature, flow rate, etc.) everytime there is a 1% change in the value. The Project Manager wants to be...
1
by: HockeyHero | last post by:
I have a simple table containing a datetime field and a number of data fields. I need to develop a stored procedure that will accept two dates as parameters and report back the average daily value...
1
by: Monroeski | last post by:
I am using Access 2003. I am setting up a form where a user selects a Clinic or Ward, beginning date, and ending date, and the form outputs the averages of a few fields based on that criteria. I...
1
by: someusernamehere | last post by:
Hey people, I need to do some sistem in PHP and MySQL, I have do it a part but the other is the problem, basically is mathemetical operations, te user register something and after insert some...
5
by: lildiapaz | last post by:
Hi, I have wrote two queries, one to find the average for one date, and the second query to find the average for another date. And I stored the results of the query to a local string object. Is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.