| | |
Turbo pascal homework
![]() |
•
•
Join Date: Feb 2005
Posts: 2
Reputation:
Solved Threads: 0
Hi,
I don't want anyone to do my assignment for me, I just want some help.
I'm a student in Suriname, formerly Dutch-Guiana. My teacher decided that we should learn how to write basic programs in Turbo Pascal to improve our "problemsolving skills" and for so far things have gone swimmingly. today i received an assignment:
http://img.photobucket.com/albums/v7...Scanned-01.jpg
I can do the first part (having the program read in all the info), I just don't know how to create a table (figure 1 and 2) or the "certificate". I've never seen that before. I've tried to look it up in some books in our library, but I've found nothing because I have no idea what I'm looking for. so can anyone just give me a word that I can look up, i don't want you to write my program, I just want a word (I'm that desperate for help :o ).
Thank you for reading this!
I don't want anyone to do my assignment for me, I just want some help.
I'm a student in Suriname, formerly Dutch-Guiana. My teacher decided that we should learn how to write basic programs in Turbo Pascal to improve our "problemsolving skills" and for so far things have gone swimmingly. today i received an assignment:
http://img.photobucket.com/albums/v7...Scanned-01.jpg
I can do the first part (having the program read in all the info), I just don't know how to create a table (figure 1 and 2) or the "certificate". I've never seen that before. I've tried to look it up in some books in our library, but I've found nothing because I have no idea what I'm looking for. so can anyone just give me a word that I can look up, i don't want you to write my program, I just want a word (I'm that desperate for help :o ).
Thank you for reading this!
How you print the table depends on how you set up your table of records. If it's actually an array of records then you're looking at a loop like this:
I'll let you work out the formatting issues as that tends to be more trial and error than anything.
I would imagine that the certificate itself is something simple along these lines:
Once again, the formatting itself so that everything is centered I will leave to you.
Pascal and Delphi Syntax (Toggle Plain Text)
writeln('Summary of Student Course Scores:') writeln('ID NAME CLASSICAL REGGAE ROCK TOTAL AVERAGE'); for i := 1 to N do writeln(s[i].id, s[i].name, s[i].classical, s[i].rock, s[i].total, s[i].average);
I would imagine that the certificate itself is something simple along these lines:
Pascal and Delphi Syntax (Toggle Plain Text)
writeln('*GOLD*\nCERTIFICATE OF OUTSTANDING\nACHIEVEMENT'); writeln('\n\n', highest.name, '\n\nIn Music Studies\n');
•
•
Join Date: Feb 2005
Posts: 2
Reputation:
Solved Threads: 0
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?
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?
•
•
Join Date: Jan 2005
Posts: 31
Reputation:
Solved Threads: 0
Pascal and Delphi Syntax (Toggle Plain Text)
highestavegrade := 0; for i:=1 to 10 do begin if avegradestudent[i] > highestavegrade then begin highestavegrade := avegradestudent[i]; end; end; for i:=1 to 10 do begin if avegradestudent[i] = highestavegrade then begin { writeln (*GOLD*, etc, etc } end; end;
![]() |
Similar Threads
- why i cant write records into file in turbo-pascal??? (Pascal and Delphi)
- Error 207:Invalid floating point operation??? in Turbo PASCAL (Pascal and Delphi)
- Turbo pascal Homework.. (Pascal and Delphi)
- Help with linked list in Turbo Pascal! (Pascal and Delphi)
- calnder programming in turbo pascal With Text & background !! (Pascal and Delphi)
- help needed to print from turbo pascal (Pascal and Delphi)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: A small stay-on-top calculator (Delphi)
- Next Thread: help with pascal!
Views: 4774 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Pascal and Delphi
animation api app array button compile console data database dbisam delete delphi delphihelpimageforloop documentcomplete2 edit environment error errors events file form function gdi gis lasrautoinc media navigatecomplete2 network object open opengl pascal passing path player procedure search set sql table twebbrowser username variable win7 windows





