Note well: these rules are not always consistent with those used in the textbook or with code I write in class to illustrate Pascal concepts.
Average := Sum / Count;
Writeln(Name, Exam1, Exam2);
IF <Boolean expression 1>
THEN <Statement 1>
ELSE IF <Boolean expression 2>
THEN <Statement 2>
ELSE <Statement 3>
Superfluous: If Score > 90
Then
Begin
Writeln('Super!!! ')
End
Not superfluous: If Score > 80
Then
Begin
If Score > 95
Then Write('Super!!!');
Writeln('Congratulations')
End
Else Writeln('Not bad!')
Writeln('The average is ', Sum / Count)
You must explicitly calculate the average, placing it in an
appropriate storage location:
Average := Sum / Count;
Writeln('The average is ', Average) Const
Low_A = 90;
If Score > Low_A
Then Writeln('Super!!! ')
RegionalTotal or
Regional_total.
Quarterly_subtotal is better than QSubtot).
Your program output should be neat and readable with adequate titles, labels and any columns aligned in a reasonable way. Make different sections of output discernible by using more "white space" to separate sections than is contained within a section.
{ Program Assignment: #??
Title: <as appropriate>
Workfile name: PRG?_S98
This program is designed to .....
Programmed by: ?????
Section: ??
Due date: ?????
Value: ?? pts. }
Compute averages }, { Update
sums }, or { Remove lead blanks }. Subsequent phrases, if any,
should be complete sentences; e.g., { Read the next line of the
file }.
If (FOUND) { If the target name is found in the list... }
Then
Begin ...
<your name>
171-<your section>
<assignment due date>
Program <number>
{ tax computation routine will appear here }.