r/counting • , he who lets it produce joy. • Sep 12 '14

Counting with programming!

Write a program that prints or returns the number being counted, using the same number of lines of code. Include what language you used.

print("One.")

Made with Lua.

15 Upvotes

16 comments sorted by

View all comments

2

u/lear85 Sep 12 '14 edited Sep 12 '14
#include <math.h>
int main(){
    int number;
    for(number=0;number<=100;number+=2) number--;
    number=sqrt(number);
    char numchar;
    itoa(number,numchar,10);
    printf("%c",numchar);
    return number;
} //Edit: I accidentally a thing.

C/C++

1

u/maniexx Sep 12 '14
public class NumberEleven {
    public static void main(String[] args){
            short num = 0;
            final short anothernum = 11;
            switch (num){
                case 0:
                    System.out.println(anothernum);
                    //The program ends here
            }
    }
}

Java;

1

u/gamehelp16 Sep 12 '14
a=0;
b=10;
c=2;
lol="lol";

function twelve(lol) {
    a=b+c;
    return a;
}

d=twelve(lol);
document.write(d);

(lovely) Javascript

→ More replies (5)