Board index » delphi » PLEASE HELP WITH THIS HOMEWORK PROGRAM!

PLEASE HELP WITH THIS HOMEWORK PROGRAM!

I am a new student in a Turbo Pascal Class and I don't have a clue what
I'm doing.
The assignment involves writing several procedures.  In general, you will
get input from the keyboard asking for three grades.  Your job is to
figure out the average of these grades.

The first procedure will get input from the keyboard ( the three grades),
and pass the information back to the main program.  Next you will call a
procedure to calculate the avarage.  In Calculate, add all of the grades
together and divide by three.  Return the average back to the calling
program.  The last procedure will print out a nice sentence saying what
the initial three grades were and their average.
Only calls to procedures should exsist in your main program.

PLEASE HELP!!

 

Re:PLEASE HELP WITH THIS HOMEWORK PROGRAM!


Quote
> I am a new student in a Turbo Pascal Class and I don't have a clue what
> I'm doing.

   That's obvious, since you're crawling over here, begging for help you
should be (1) getting from YOUR TEACHER and/or (2) by attending/staying
awake IN CLASS...

Quote
> The assignment involves writing several procedures.  In general, you will
> get input from the keyboard asking for three grades.  Your job is to
> figure out the average of these grades.

   No, YOUR JOB is to attend class, work with your teacher, and do the
best YOU can to accomplish the task!  You've shown NOTHING of what
you've tried so far, and such a lack of effort/initiative can
hardly be viewed in a positive or sympathetic way.  That's what school is
about...as well as Life.  Begging for help in places like this, you might
as well start getting out a piece of cardboard and crayon and get your
{*word*82}over to some street corner - to beg for food/$$$/pity/etc.  I don't
know where/how you got the idea that others will do your work for you, in
places like this, but somehow you got the WRONG IDEA about how things
work.  Things assigned in school are for your (potential and hopeful)
benefit and learning, and you won't really learn something we do for you.
Quote
> etc.
> Only calls to procedures should exsist in your main program.
>                                 ^^^^^^   Apparently, you can't even copy the assignment correctly!

   Frankie, how ARE you going to get the grade/credit which WE earn back
to us, since YOU'RE the one signed up for the class?...  I mean, if we do
your work for you, don't we deserve something for our efforts?
   <sigh...>

Re:PLEASE HELP WITH THIS HOMEWORK PROGRAM!


Quote
frankd...@aol.com (FRANKD311) wrote:
>PLEASE HELP!!

Lamer asking us to do his homework again.  You must need your mother
to help you put your clothes on in the morning...does what we all said
the first time come through?  Do it yourself!

Re:PLEASE HELP WITH THIS HOMEWORK PROGRAM!


On 23 Sep 1996 12:04:30 -0400, frankd...@aol.com (FRANKD311) wrote:

Quote
>I am a new student in a Turbo Pascal Class and I don't have a clue what
>I'm doing.
>The assignment involves writing several procedures.  In general, you will
>get input from the keyboard asking for three grades.  Your job is to
>figure out the average of these grades.

Generally, you'll have to show a little more effort on your part before
you'll get much help.  Have you any code written thus far?  It will help
us make more specific suggestions.

At any rate, here's a rough outline of your problem.  Your assignment
description spelled it out pretty explicitly; however, you might benefit
from something that more closely resembles code:

Program AverageGrades;

PROCEDURE GetGrades(VAR grade1, grade2, grade3: CHAR);
{ Returns three letter grades in grade1, grade2 and grade3 }

FUNCTION Calculate(grade1, grade2, grade3: CHAR): real;
{ Returns real grade average given three letter grades grade1..grade3}

PROCEDURE DisplayAverageGrade(grade1, grade2, grade3: CHAR; avg: real);
{ Displays message stating three grades and average from Calculate }

VAR g1, g2, g3: CHAR;
        avg_grade: REAL;
BEGIN  {main}
        GetGrades(g1,g2,g3);
        avg_grade:=Calculate(g1,g2,g3);
        DisplayAverageGrade(g1,g2,g3,avg_grade)
END.

The particulars are left to you.

--
Robert B. Clark <rcl...@iquest.net>
"Be wary of strong spirits.  It can make you shoot at tax collectors...
and miss." --RAH

Re:PLEASE HELP WITH THIS HOMEWORK PROGRAM!


In article <526cee$...@newsbf02.news.aol.com>, frankd...@aol.com

Quote
(FRANKD311) wrote:
> I am a new student in a Turbo Pascal Class and I don't have a clue what
> I'm doing.

clip clip clip...8<

Quote
> PLEASE HELP!!

If there is one thing I can tell you about programming, it's this: You
MUST have motivation and a strong wanting to program. Pascal is not simply
a class you take, where you can rough it through tests and copy off your
pals. You have to want to learn it, because if you cheat, you'll fail.
It's that simple.

Why did you even take Pascal in the first place? It seems to be
uninteresting and difficult to you. If you REALLY want to learn, why don't
you take notes, use the help menu often (Shift-F1, I used that damn menu
every single day of my Pascal course!!), and check out a few books on
Turbo Pascal? As the days go by, you'll find yourself getting more and
more behind as your classmates speed ahead. What you should do is tell
your teacher that you haven't got a clue, and have him/her help you out.

Also, there are a MILLION documents on the net explaining Pascal commands
and procedures. Why not check some of them out? Why not read the
newsgroup's FAQ for information?

Like I said, you have to really want to program to exceed in Pascal. If
you took this class to fill credits, or to waste an extra block/period,
you should transfer into somthing more to your taste. And don't go here
asking for source code. It just shows don't want to learn Pascal.

<cg...@hooked.net>

Other Threads