Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

77%
+5 −0
Challenges 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 outpu...

14 answers  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 2y ago by torres‭

#2: Post edited by user avatar AndrewTheCodegolfer‭ · 2021-07-02T09:13:08Z (almost 3 years ago)
  • 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 by user avatar AndrewTheCodegolfer‭ · 2021-07-02T09:08:29Z (almost 3 years ago)
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!