PPL PRINT Function
07-26-2015, 11:16 AM (This post was last modified: 07-26-2015 11:35 AM by DrD.)
Post: #2
 DrD Senior Member Posts: 1,133 Joined: Feb 2014
RE: PPL PRINT Function
One way to do it (click in terminal screen to end, or wait for timeout):

Code:
 EXPORT Dollar() BEGIN   PRINT();   C:=0;   FOR P FROM 0 TO 100 STEP 5 DO     FOR N FROM 0 TO 20 DO       FOR D FROM 0 TO 10 DO         FOR Q FROM 0 TO 4 DO           IF P+(N*5)+(D*10)+(Q*25)=100 THEN C:=C+1; //PRINT("P:" +P); //PRINT("N:" +N); //PRINT("D:" +D); //PRINT("Q:" +Q);           print("P:" +P + "  " + "N:" +N +"  " + "D:" +D + "  " +"Q:" +Q);           END;  // ends if         END;  // ends Q       END;  // ends D     END;  //  ends N   END;  //  ends P   wait(-1);   return MSGBOX("ways_to_make_a_dollar="+C); END;
 « Next Oldest | Next Newest »

 Messages In This Thread PPL PRINT Function - smp - 07-26-2015, 10:51 AM RE: PPL PRINT Function - DrD - 07-26-2015 11:16 AM RE: PPL PRINT Function - smp - 07-26-2015, 01:18 PM

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