![]() |
|
#1
|
|||
|
|||
Gradebook Program - Small Problem, Need AssistanceHi everyone, I am going to post a gradebook program I wrote recently, but am having some trouble with. I need to have averages in both the Columns and Rows, but can't seem to get the Columns to work, right now it just shows the same as the Rows...If anyone can see my error, which I am sure is there, please let me know, and thanks.
CPP / C++ / C Code:
|
|
#2
|
||||
|
||||
Re: Gradebook Program - Small Problem, Need AssistanceMerely change this line in the colAverage() function:
CPP / C++ / C Code:
CPP / C++ / C Code:
Output Code:
Also, where you have declared 'row' and 'col' as integers, there is no need to initialize them with 0.0 -- just 0 is ok. There were warnings for all those: Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Gradebook Program - Small Problem, Need AssistanceI can't thank you enough! That worked! Smiles!
|
|
#4
|
|||
|
|||
Re: Gradebook Program - Small Problem, Need AssistanceAlso be aware that down a couple of lines below what TurboPT referred to you have:
CPP / C++ / C Code:
But if you were to change that size in the future???? Do yourself a favor in the future and place some strategic printf()'s to check your values like: CPP / C++ / C Code:
It takes a little time but reduces facial squinch lines in the long run... |
Recent GIDBlog
Observations of Iraq by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 10:13 |
| Problem compiling MFC program | shvalb | MS Visual C++ / MFC Forum | 1 | 21-Sep-2006 20:14 |
| Pipeline freeze simulation | darklightred | C++ Forum | 6 | 27-Jul-2006 19:37 |
| Fresh Small C++ Program :P | Sabin044 | C++ Forum | 40 | 02-Feb-2006 18:57 |
| Small help with this program please | NigelZen | C Programming Language | 3 | 28-Aug-2005 23:17 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The