From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,12b7ccf8e17b10da,start X-Google-Attributes: gid103376,public From: Sam Subject: Using ADA to write a Grade Program (ARRAYS) Date: 1998/04/19 Message-ID: <353A332D.81A5677E@erols.com>#1/1 X-Deja-AN: 345689111 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@erols.com X-Trace: winter.news.erols.com 893006942 17641 207.172.110.145 (19 Apr 1998 17:29:02 GMT) Organization: Erol's Internet Services Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-04-19T00:00:00+00:00 List-Id: 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