# Write some code...

Write a program that takes no input and outputs an integer n which is a multiple of 3. So n=3k, where k is a positive integer.
Double the last character of your code.
Your code should then output k.

# Examples

Here is my program hui#2(21+4)//lm, which outputs 81. Because of that, hui#2(21+4)//lmm should output 27.
or
If p8$w2*8 outputs 9, p8$w2*88 should output 3.

# Rules

This is , shortest answer in bytes wins!

• Can it output 9.0 and 3.0? (Taking square roots, so it automatically turns into a float. :P) – totallyhuman Aug 27 '17 at 1:02
• This is a less interesting version of double the source, double the output. And that wasn't terribly interesting to begin with. – Wheat Wizard Aug 27 '17 at 3:26
• I've downvoted this as, even by my standards, this is far too trivial, solvable with basic subtraction or square rooting, as illustrated by a lot of the solutions so far. – Shaggy Aug 27 '17 at 8:04
• @BillSteihn You don't understand - this is code golf. The goal is to find the shortest answer, not to be creative. The answer that Shaggy provided is a trivial way of achieving your answer, and will be the shortest way to solve this challenge in most languages. – clismique Aug 27 '17 at 9:20
• As @QwerpDerp said, this is code golf; creativity is, for the most part, not conducive to a healthy byte count. – Shaggy Aug 27 '17 at 17:09

Ruby, 5 bytes

3/0b1


Division by one or three, written in binary.

• This appears to be a code snippet and not a function or full program. – LyricLy Aug 29 '17 at 5:31

# RProgN 2, 2 bytes

6›


6› takes 6 and shifts it right. 110 -> 11 which gives 3. 6›› shifts 6 twice, which gives 110 -> 1, or 1.

Try it online!

# Forth (gforth), 10 bytes

Feels cheap to just overwrite the 33 numeric literal, but it's the shortest way I know of to make this work in forth

: 33 1 ; 3


Try it online!

outputs 3

: 33 1 ; 33


Try it online!

outputs 1

### Explanation

: 33 1 ;  \ defines a new word 33 that puts a 1 on the stack.
\ In forth explicit word definitions are parsed before numeric literals

• This is in the wrong direction. You should output 3 for the first program and 1 for the second. – Weijun Zhou Feb 7 '18 at 18:39
• @WeijunZhou Good catch, thanks for pointing that out – reffu Feb 7 '18 at 18:51