From: Sam <oglesbys@erols.com>
Subject: Using ADA to write a Grade Program (ARRAYS)
Date: 1998/04/19
Date: 1998-04-19T00:00:00+00:00 [thread overview]
Message-ID: <353A332D.81A5677E@erols.com> (raw)
I am very pleased with the response, I guess I need to include further
details:
I need to write an ADA program that reads grade information
(names/grades) into two ARRAYS, one for names the other for grades.
Then compute the average, print out a file that shows the student's
name, his grade and the word Satisfacory or Unsatisfactory, if the grade
is within 10 points of average. Here is the code I have so far:
Type float ARRAY is ARRAY (1..20) of Floats
A: Float
i : Integer := 0
Avg, Sum, Below : Integer := 0
Begin
While Not Endo Of File Loop
Ada.Integer_Text_IO.Get (a(i));
Sum := Sum + a(i);
i := i + 1;
End Loop
Avg := Sum/ "this I am not sure about?"
For i in i..(i-1) Loop
If a(i) < avg THEN
Below := Below = 1;
ELSIF a(i) > avg THEN
Above := Above + 1;
Else
Same := Same + 1;
End If
End Loop............this is where my problem happens, how do I attach
a string to this, and how do I produce the end result......I am kinda
stuck, thanks to anyone who assists me.
Sam
next reply other threads:[~1998-04-19 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-19 0:00 Sam [this message]
1998-04-19 0:00 ` Using ADA to write a Grade Program (ARRAYS) Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox