Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer backup black screen blue screen boot bsod computer connection crash css dell driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
c++ grade program


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Horace's Avatar
Junior Member with 1 posts.
 
Join Date: Mar 2004
03-Mar-2004, 11:59 AM #1
c++ grade program
hey i've been trying to create a program that will read a student’s name together with his or her test scores from a file i called grades.dat
Well after i did that i ran into problems I tried to use a void function to determine the average for the five test scores i had for each student and then i had a loop to read the five test score and get a sum for them. For some reason this is not working at all it's not coming up i try to make a return value function but i just get a bunch of errors.
I need the program to output somthing like the following:

Student# Test1 Test2 Test3 Test4 Test5 Average
A 75 83 77 91 76 80.40 B
B 80 90 95 93 48 81.20 B
C 78 81 11 90 73 66.60 D
D 92 83 30 69 87 72.20 C
E 23 45 96 38 59 52.20 F
F 60 85 45 39 67 59.20 F
G 27 31 52 74 83 53.40 F

Class Average = 66.46
Percentage of A's: 0.00
Percentage of B's: 0.29
Percentage of C's: 0.14


I would really appreciate if someone could give me someidea what to do after i use the loop to read the test scores and get the sum
Guy's Avatar
Guy Guy is offline
Senior Member with 260 posts.
 
Join Date: Feb 1999
Location: abby, BC, canada
03-Mar-2004, 02:09 PM #2
1. Show us some code. We can not help you with your code if we dont know what it is.
2. Explain in detail the error. ie. What was input into the function? what did you get returned? what did you expect to get returned?
3. We dont DO homework. but we can HELP with homework if you get stuck on specific problems.
4. Welcome to TSG

Now regarding your problem.
Are you positive that the values you read in from the file are valid when they are in their storage variable? ie. array or vector
To output text to a console screen look up the std::cout operator that resides in the header <iostream>

Good Luck
__________________
There are only 10 types of people in the world; Those who understand binary, and those who dont.
AlbertB's Avatar
Distinguished Member with 2,432 posts.
 
Join Date: Nov 2002
Location: Hampshire, UK
04-Mar-2004, 04:31 AM #3
Hello Horace?

Any movement forward with your problem. Some of us are waiting here for you to post a snippet of your current code then we can come in on things with help! We want to be sure you have the first part functioning before we go ahead with the second.
__________________
1. "I make no personal claim to the truth, only the right to seek it, prove it in argument, and to be wrong many times in order to reach it."

2. "We have made a cage of words and placed our God inside, as boys trap a cricket, to make him sing for us alone."

Galileo Galilei
Snake~eyes's Avatar
Senior Member with 639 posts.
 
Join Date: Apr 2002
04-Mar-2004, 11:46 AM #4
I guess he deson't want muhc help
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:48 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.