Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CONCATENATED = exists( "BAB" );
- if CONCATENATED == 1 then
- SOL = SOL + "-" + "984F8";
- disp( SOL )
- clear BAB;
- else
- BAB = 1;
- SOL = "71E17";
- end
- // Programming Challenge - Concatenation v2 (October 2018)
- // A => B; concatenated BAB == result; B,BA,AB ~= result;
- // My revised suggestion of a solution to this programming puzzle done in Scilab 6.0.1 code:
- // Revision v2: string as argument for function exists and new line inserted at the end of B.
- CONCATENATED = exists( "BAB" );
- if CONCATENATED == 1 then
- SOL = SOL + "-" + "65E47" + "-" + "AD4D2";
- else
- mprintf(' CONCATENATED = exists( ""BAB"" );\n if CONCATENATED == 1 then\n SOL = SOL + ""-"" + ""984F8"";\n disp( SOL )\n clear BAB;\n else\n BAB = 1;\n SOL = ""71E17"";\n end\n ')
- end
- // Thank you for the challenge!
- CONCATENATED = exists( "BAB" );
- if CONCATENATED == 1 then
- SOL = SOL + "-" + "984F8";
- disp( SOL )
- clear BAB;
- else
- BAB = 1;
- SOL = "71E17";
- end
Add Comment
Please, Sign In to add comment