Post Reply 
Dealing with Integers on the Prime. (SOLVED!)
04-14-2015, 09:28 PM (This post was last modified: 04-14-2015 09:31 PM by DrD.)
Post: #10
RE: Dealing with Integers on the Prime. Help!
(04-14-2015 05:43 PM)Spybot Wrote:  >>> how can I exit the program anytime I want?
Spybot.

You can always exit the program by using the "On" key. If you want to exit the repeat loop, insert a test condition, (example in bold), after the input statement:

EXPORT test()
BEGIN
local A,B,C;

repeat
{A:=0,B:=0,C:=0}; // Recycles non-integers
INPUT({{A,[0],{10,15,1}},{B,[0],{40,15,1}},{C,[0],{70,15,1}}},"STANDARD FORM",{"A:","B:","C:"},{"Coefficient A must be a Positive Integer.","Coefficient B must be an Integer.","Coefficient B must be an Integer."});
If (A==B)==C==0 then return "Done"; end; // No inputs changed, just "Enter" at input prompt
until fp(A)==0 AND A≥0 AND fp(B)==0 AND fp(C)==0;

PRINT();
PRINT("Values are Valid.");
PRINT("A="+A+" B="+B+" C="+C);
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Dealing with Integers on the Prime. Help! - DrD - 04-14-2015 09:28 PM



User(s) browsing this thread: 1 Guest(s)