Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

‭☭ Crimson skies ☭‬

Name: Anonymous 2010-02-01 21:38

I'm wondering why the red countries produce such skilled hackers.
Maybe the difference be their strict and result-oriented schooling system. Or their lawlessness and disregard for copyrights. Maybe it's because they are bred with older and more hackable computer systems instead of the Fisher Price iPhones fat Americans get to play with.

Could these Russian, Czech and Chinese hackers be driven by the spirit of communism itself. Did our comrade Trotskij miss out on a glorious computing career?

Name: Anonymous 2010-02-07 11:38

That seems to use a lot of unnecessary variables and work just to round a number.

THIS IS NOW A post your own rounding algorithm THREAD

Here's mine, written in Sessless (also known as C):

double round (double number)
{
    float test = (int)number;
    if      (number < (test + .3))
        return test;
    else if (number > (test + .7))
        return test + 1.0;
    else
        return test + 0.5;
}


A program to test it:

#include <stdio.h>

int main ()
{
    double derp[] = {1.2, 1.4, 1.6, 1.8};
    int x;
   
    for (x = 0; x < 4; x++)
    {
        printf ("%1.1f rounds to %1.1f\n", derp[x], round (derp[x]));
    }
   
    return 0;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List