'=========================================================================== ' Subject: FLIPPO 24 GAME SOLVER Date: 06-14-98 (23:39) ' Author: Bert van Dam Code: QB, QBasic, PDS ' Origin: bd1rsd@usa.net Packet: ALGOR.ABC '=========================================================================== ' FLIPPO 24GAME SOLVER 'Did you join in the Smiths 24 game flippo craze? And do you still have some to 'which you can't find the answer? Here's the solution for you. Simply type the 'numbers into this program, run it, and the solution will be found. 'Never heard of those flippo's? It's a game where you get 4 numbers. From these 'four numbers you have to make 24. The rules are simple: ' 1. You can only use addition, substraction, multiplication and division ' 2. Each number must be used exactly!! once 'Sounds simple, so here's an example from flippo 303: the numbers are 4,4,8,8 'and the solution is straight forward: 4+4+8+8=24. Now a little bit more 'difficult from flippo 314: the numbers are 4,7,7,7. 'Can't find the answer? Then this program is for you: DEFINT A-Z:DIM SHARED K,S,B&,Z&:V1 'Created by PostIt! 7.3 SUB V1:OPEN "O",1,"FLIPPO.ZIP",4^6:Z&=3346:?STRING$(50,177); U"%up()%9%%%R-%2HfFIwp4O30%.%%]%%%%-%%%%uj%wrSi%fypqmosZ^%oqon:+a U"Bn1EEAo(7_qn1'XsIF(RnX#EZnX[EZnBJXEEA.oG_qIn)XsmI(RB8XE6epnos]C U"I_?oS0Ejc(i_moC7_23CKRm_&he&5.$.s<&7%m)&w2%u%p()9%%%%-s%H4FRIQ8 U"O)Q&'%%%>-%%%0%%%%ktw%rljs%SgfxENcf>BSe5TThmuV[LLwenS]+Z0Iyyi*S U"g/.e;)]MQdS-Ya#,kWVD8xL&6V[5A7#3<^zS9mEoj\>/5B.2YQbqr?$ThDn5]\l U"&t9Aso0($wowr4NM=,TZ:yQ71Ql5'e4><6SGG:y-BQ=OcSapm_B(OrEM?R*+'\3 U"qI#yx;3;asl^FT1u\YXwDckS2-Ia&sMq5yYa5&9J?$BdRz>l,*MM>^tBsmUn*sU U"K8Omq'x*neQYxQky=?:TdAM[$3>L[O.Ox)DO4>%N2c8cujv:m%eZe[m2g=+dyqt U"2Y_A$/4v508a#Mo7:%CX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