User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 403,018 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,847 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser: Programming Forums

Turbo pascal homework

Join Date: Feb 2005
Posts: 2
Reputation: Paramaribo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Paramaribo Paramaribo is offline Offline
Newbie Poster

Re: Turbo pascal homework

  #3  
Feb 27th, 2005
Thanks, your advice was really helpfull. I have on last question, if you don't mind.

Here's the last part of my program:

highestavegrade := avegradestudent[1];
FOR i:=2 TO 10 DO
BEGIN
IF avegradestudent[i] >= highestavegrade
THEN highestavegrade := avegradestudent[i];
END;
FOR i:=1 TO 10 DO
BEGIN
IF avegradestudent[i] >= highestavegrade
THEN writeln (*GOLD*, etc, etc

When I run the program all the names of the students appear, instead of the one with the highest average (Jack Bean). What am I doing wrong?
Reply With Quote  
All times are GMT -4. The time now is 9:55 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC