Count to 2 1000 times!

For all your silly time-killing forum games.

Moderators: jestingrabbit, Moderators General, Prelates

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 8:08 pm UTC

Code: Select all

#include<stdio.h>

int main() {
    int d = 0;
    for (int c = 0; c < 5; c++) {
        d += c * c * c;
    }
    d /= 2;
    printf("%c\n", d);
    return 0;
}

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 8:13 pm UTC

Image
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 8:15 pm UTC

faubiguy wrote:

Code: Select all

#include<stdio.h>

int main() {
    int d = 0;
    for (int c = 0; c < 5; c++) {
        d += c * c * c;
    }
    d /= 2;
    printf("%c\n", d);
    return 0;
}


I don't understand that, could you please explain what that program actually does?

The number of socks I'm wearing.
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 8:16 pm UTC

username5243 wrote:The number of socks I'm wearing.

The number of username5243's my socks I'm wearing.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 8:17 pm UTC

8/4
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 8:21 pm UTC



username5243 wrote:I don't understand that, could you please explain what that program actually does?


It starts d at 0, then adds c3 to d for each value of c from 0 to 4 inclusive, so d = 100. Then it divides d by 2 so d = 50, and prints the character with ASCII code 50, which is "2".

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 8:27 pm UTC

два
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 8:45 pm UTC

I was just curious...maybe I should start learning myself, but I don't know, it looks complicated...

The number of people who's usernames start with "f" that have posted on this thread.
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 8:50 pm UTC

The current hour of the day (in 24-hour UTC) divided by 10.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 9:14 pm UTC

Code: Select all

print(chr(sum(c**3 for c in range(5))//2))


Code in Python that does the same thing.

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 9:17 pm UTC

faubiguy wrote:

Code: Select all

print(chr(sum(c**3 for c in range(5))//2))


Code in Python that does the same thing.


Can confirm, works in Python.

Image
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 9:23 pm UTC

The number of different programming languages faubiguy has posted programs for in this thread. (Or at least the first one looks like a different language...)
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 9:25 pm UTC

The number of occurrences of the word "number" in this post.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 9:37 pm UTC

The number of c's in the word "occurrences".
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 9:38 pm UTC

...Uh, this is Count to 2, not Count to 3. :P

The number of "r"s in the word "occurrences".
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 9:38 pm UTC

You got me.

The number of double-letters in the word "occurrences".
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 9:39 pm UTC

The number of "e"s in the word "occurrences".
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 9:45 pm UTC

Code: Select all

d = 0
for c = 0, 4 do
    d = d + c^3
end
d = d / 2
print(string.char(d))


The first one is C; here's one in Lua.

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 9:53 pm UTC

The number of occurrences of the character "0" in faubiguy's latest code block.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 9:57 pm UTC

Code: Select all

import Data.Char
main=putStr $ chr ((sum $ map (\c -> c*c*c) [0..4]) `div` 2):"\n"


This one is Haskell.

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 10:00 pm UTC

The number of "l"s in "Haskell".
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:03 pm UTC

Code: Select all

$d=0;
$d += $_**3 for 0..4;
$d /= 2;
printf "%c\n", $d;


Perl.

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 10:08 pm UTC

Image
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:13 pm UTC

Code: Select all

public class PrintTwo {
    public static void main(String[] args) {
        int d = 0;
        for (int c = 0; c < 5; c++) {
            d += c * c * c;
        }
        d /= 2;
        System.out.println(new String(Character.toChars(d)));
    }
}


Java.

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 10:17 pm UTC

The number after the first "Print" in faubiguy's latest code.

It's PrintTwo.
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:20 pm UTC

Code: Select all

d=0
for c in $(seq 4); do
    d=$((d + c**3))
done
printf "\x$(printf %x $((d/2)))\n"


Bash.

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 10:22 pm UTC

The number of eyes I have.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:25 pm UTC

Code: Select all

+++++[>>[-]>[-]<<[>+>+<<-]>>[<<+>>-]>[-]<<[>>+<<-]>>[<<<[>+>+<<-]>>[<<+>>-]>-]<<[>>+<<-]>>[<<<[>+>+<<-]>>[<<+>>-]>-]<<[>>>+<<<-]<+<-]>>>>>[>+<--]>.


And lastly, brainfuck.

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 10:26 pm UTC

The number of brains two people have.
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 10:27 pm UTC

The number of ears I have.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 10:28 pm UTC

The cube root of the number of programming languages faubiguy posted.
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 10:28 pm UTC

The number of nostrils I have.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 10:30 pm UTC

The number of words that start with N in the last post.
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:31 pm UTC

The number of solutions to x*x = 1

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 10:44 pm UTC

The number of real solutions to x^4 = 16
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:48 pm UTC

The number of non-real solutions to x3 = 8

User avatar
flicky1991
Like in Cinderella?
Posts: 619
Joined: Fri Feb 11, 2011 3:36 pm UTC
Location: London

Re: Count to 2 1000 times!

Postby flicky1991 » Wed Feb 10, 2016 10:48 pm UTC

The number of hands I have.
any pronouns
----
Discord for Forum Games posters
(Please let me know if the link doesn't work)

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:57 pm UTC

The first integer which evenly divides 8 but not 9.

username5243
Posts: 49
Joined: Thu Jun 25, 2015 10:43 am UTC
Location: None of your business

Re: Count to 2 1000 times!

Postby username5243 » Wed Feb 10, 2016 10:58 pm UTC

The number of feet I have
This is a signature, in case you didn't notice.

Current tokens: 66.562

User avatar
faubiguy
Posts: 13
Joined: Sun Aug 11, 2013 9:20 am UTC

Re: Count to 2 1000 times!

Postby faubiguy » Wed Feb 10, 2016 10:59 pm UTC

The number of feet in yard, minus one.


Return to “Forum Games”

Who is online

Users browsing this forum: No registered users and 42 guests