Post History
Create a program P1 which takes as input a base 10 number N1 (the numbers for the variables are important). Given N1, P1 will print a program P2. P2 will take as input a base 10 number N2 and outpu...
#2: Post edited
- Create a program P1 which takes as input a base 10 number N1 (the numbers for the variables are important). Given N1, P1 will print a program P2. P2 will take as input a base 10 number N2 and output N1+N2.
- P1 and P2 have to be in the same language.
If your language doesn't have STDIN, you may treat P1 like a function and specify a placeholder in your answer where the "input" would be. P2 could also be a function in this case.- The person who creates the shortest scoring program wins. Have fun, everyone!
- Create a program P1 which takes as input a base 10 number N1 (the numbers for the variables are important). Given N1, P1 will print a program P2. P2 will take as input a base 10 number N2 and output N1+N2.
- P1 and P2 have to be in the same language.
- If your language doesn't have STDIN, for P1 and P2 you may specify a placeholder in your answer where the "input" would be.
- The person who creates the shortest scoring program wins. Have fun, everyone!
#1: Initial revision
A number adder, not a death adder
Create a program P1 which takes as input a base 10 number N1 (the numbers for the variables are important). Given N1, P1 will print a program P2. P2 will take as input a base 10 number N2 and output N1+N2. P1 and P2 have to be in the same language. If your language doesn't have STDIN, you may treat P1 like a function and specify a placeholder in your answer where the "input" would be. P2 could also be a function in this case. The person who creates the shortest scoring program wins. Have fun, everyone!