[BACK]Return to ts_exp.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Continuation

Annotation of OpenXM_contrib/PHC/Ada/Continuation/ts_exp.adb, Revision 1.1.1.1

1.1       maekawa     1: with text_io;                             use text_io;
                      2: with Standard_Floating_Numbers;           use Standard_Floating_Numbers;
                      3: with Standard_Floating_Numbers_io;        use Standard_Floating_Numbers_io;
                      4: with Standard_Mathematical_Functions;     use Standard_Mathematical_Functions;
                      5:
                      6: procedure ts_exp is
                      7:
                      8:   a,b : double_float;
                      9:   ans : character;
                     10:
                     11: begin
                     12:   new_line;
                     13:   put_line("Calculating a**b, for a,b floating points");
                     14:   new_line;
                     15:   loop
                     16:     put("Give a : "); get(a);
                     17:        loop
                     18:       put("Give b : "); get(b);
                     19:       put(a); put("**"); put(b);
                     20:       put(" : "); put(a**b); new_line;
                     21:       put("Do you want other exponents of a ? (y/n) ");
                     22:       get(ans);
                     23:       exit when (ans /= 'y');
                     24:     end loop;
                     25:     put("Do you want other values for a ? (y/n) ");
                     26:     get(ans);
                     27:     exit when (ans /= 'y');
                     28:   end loop;
                     29: end ts_exp;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>