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

File: [local] / OpenXM_contrib / PHC / Ada / Continuation / ts_exp.adb (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:22 2000 UTC (23 years, 6 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

Import the second public release of PHCpack.

OKed by Jan Verschelde.

with text_io;                             use text_io;
with Standard_Floating_Numbers;           use Standard_Floating_Numbers;
with Standard_Floating_Numbers_io;        use Standard_Floating_Numbers_io;
with Standard_Mathematical_Functions;     use Standard_Mathematical_Functions;

procedure ts_exp is

  a,b : double_float;
  ans : character;

begin
  new_line;
  put_line("Calculating a**b, for a,b floating points");
  new_line;
  loop
    put("Give a : "); get(a);
	loop
      put("Give b : "); get(b);
      put(a); put("**"); put(b);
      put(" : "); put(a**b); new_line;
      put("Do you want other exponents of a ? (y/n) ");
      get(ans);
      exit when (ans /= 'y');
    end loop;
    put("Do you want other values for a ? (y/n) ");
    get(ans);
    exit when (ans /= 'y');
  end loop;
end ts_exp;