Board index » delphi » having problem with compiler directives and variable limits
ben.wooda...@nocturnal.com
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
having problem with compiler directives and variable limitsI have taking a Pascal programming class for about three months. I wrote a factoring algorithm. It works fine, up to about the here's my code: Program Calculate_Factors (input, output); Uses CRT; Type Exponential = record Type Factor_Array = Array [1..10] of Exponential; Var choice: Char; BEGIN ClrScr; Repeat Q:=1; if q>1 then writeln('Please Enter a n:=trunc(number); s:=1; f:=2; e:=0; m:=Sqrt(n); For Q:= 1 to 10 Do While f<=m do While (trunc(n) Mod f)=0 Do If e>0 Then If f=2 End; {end of While-do statement} If n<>1 Then Writeln('The Prime Factors of ',number:0:0,' are:'); q:=1; Repeat Writeln('Press Any Key to Rerun or <q> to quit.':78);writeln;writeln; choice:=(readkey); Until choice In ['q','Q']; END. End *************8 -------------------==== Posted via Deja News ====----------------------- |