In order to get you started, this is the structure of the first homework problem. It can be used as-is or modified to suit your needs. As you can see it was compiled and executed. Again. Note the differences in AdaEd and Telesoft. $ ADA CHANGE CHANGE.DAT NYU ANSI-Ada/ED 1.1(11-Apr-83) THU 19 JAN 84 14:55:33 PAGE 1 ADAfile: CHANGE.ADA 1 -- A POSSIBLE SOLUTION TO HOMEWORK 1. MAKE CHANGE AdaEd VERSION 2 3 with TEXT_IO ; use TEXT_IO ; 4 5 procedure MAIN is 6 AMOUNT,QUARTERS,DIMES,NICKELS,PENNIES : INTEGER ; 7 package INT_IO is new INTEGER_IO(INTEGER) ; use INT_IO ; 8 begin 9 loop 10 begin -- CREATE A BLOCK WITH AN EXCEPTION HANDLER 11 -- IN ORDER TO STAY IN LOOP 12 GET(AMOUNT); 13 if AMOUNT > 99 then 14 PUT(AMOUNT) ; PUT_LINE(" IS TOO LARGE TO MAKE CHANGE"); 15 elsif AMOUNT < 1 then 16 PUT(AMOUNT) ; PUT_LINE(" NO CHANGE POSSIBLE"); 17 else 18 -- PUT YOUR CODE HERE TO COMPUTE CHANGE 19 null ; 20 end if ; 21 exception 22 when END_ERROR => 23 PUT_LINE(" END OF CHANGE RUN"); 24 exit ; 25 when DATA_ERROR => 26 PUT_LINE(" NON INTEGER INPUT DATA"); 27 end ; -- END OF BLOCK WITHIN LOOP 28 end loop ; 29 end MAIN ; No translation errors detected Translation time: 46 seconds Binding time: 3.6 seconds Begin Ada execution -5 NO CHANGE POSSIBLE END OF CHANGE RUN Execution complete Execution time: 9 seconds I-code statements executed: 65 $ exit $ TADA/LIST=CHANGE CHANGE TeleSoft-Ada compiler -- Version 1.3d March 25, 1983 Copyright (c) 1981,1982,1983 TeleSoft. All rights reserved. Opening change.text Symbol table space: 127.5K bytes Compilation complete Syntax errors: 0 Semantic errors: 0 Lines compiled: 25 reset(change.CODE) rewrite(change.CODE) Segment 1, 1 procedures . end. $ TYPE CHANGE.LIS Opening change.text 1: -- ANOTHER POSSIBLE SOLUTION TO HOMEWORK 1. MAKE CHANGE Telesoft VERSION 2: 3: with TEXT_IO ; use TEXT_IO, INTEGER_IO ; 4: 5: procedure MAIN is 6: AMOUNT,QUARTERS,DIMES,NICKELS,PENNIES : INTEGER ; 7: begin 8: loop 9: GET(AMOUNT); 10: if AMOUNT > 99 then 11: PUT(AMOUNT) ; PUT_LINE(" IS TOO LARGE TO MAKE CHANGE"); 12: elsif AMOUNT < 1 then 13: PUT(AMOUNT) ; PUT_LINE(" NO CHANGE POSSIBLE"); 14: else 15: -- PUT YOUR CODE HERE TO COMPUTE CHANGE 16: null ; 17: end if ; 18: end loop ; 19: exception 20: when END_ERROR => 21: PUT_LINE(" END OF CHANGE RUN"); 22: -- not allowed in telesoft RETURN ; 23: when DATA_ERROR => 24: PUT_LINE(" NON INTEGER INPUT DATA"); 25: end MAIN ; Compilation complete Syntax errors: 0 Semantic errors: 0 Lines compiled: 25 $ TRUN CHANGE 101 IS TOO LARGE TO MAKE CHANGE -5 NO CHANGE POSSIBLE END OF CHANGE RUN