Cookie Thread Act 3: The Cookie Strikes Back

I cant do math in my head help

I almost exclusively do math in my head but I cannot keep track of anything. this is evil

2 Likes

what if you removed ALL comparisons from the program

…actually, I have no idea what I’m doing.
Carry on.

nono youre cooking actually. you get a 7.999 but the rounded number is still 8. Surely there is something here
like yeah it adds a harsher limit to the number of places and changes the functionality on .5 but there is smth here

ive done this before

1 Like

did it actually run faster :flushed:

i’ve tried something like this and it was slower
but there were also ways I could make it a lot better

this is true unironically
this is why the jonkler odesn’ die

2 Likes

the day i dont like this image is the day ive died (or i missed it or something)

1 Like

i was on a power trip. I had to make a guessing game program for a class to learn about if statements and i said hey. what if i dont use any if statements. or try except. or arrays/maps. and just kept on adding absurd conditions to the challenge
my solution was to use a uint16 as a pseudo-bitarray and use an absurd amount of boolean logic

3 Likes

I think I’ve got it; just need to play 20 Questions with Java.

there were numerous ways I could “take the easy way” but i kept on refusing and got sad when I found more. mostly because I’d use them to fix one problem and realise I could use them to fix All Problems
i can send you the resulting code if you want

2 Likes

i was originally building it off java as that was what i was learning but java is fucked up and booleans cannot be converted to fucking ints without a conditional. So I decided I’d learn c++ Just For That

like yes, technically I could print everything using the string.repeat trick. which is why I banned the string.repeat trick. so instead i ended up using string.substring. and realising I had just did the same thing and at that point I just went with it

2 Likes

the trick to take input only in specific situations is fucked though like that shit is insane

2 Likes

eliza bestie i dont understand why you like my posts sometimes

2 Likes

skill issue

    std::cin.ignore(std::numeric_limits<std::streamsize>::max() * printQuestion, '\n');
    std::getline(std::cin, fourStr);

what was she cooking (I do not remember how I came up with this)

1 Like

iirc this only works with getline. this doesnt work with your standard std::cin >> x deal. at least not exactly