Thread: just some code on random stuph

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    18

    just some code on random stuph

    Code:
    //This is the header file to Initialize the function rando()
    #include <time.h>
    #include <stdlib.h>
    rando(int x);
    rando(int x)
    {
        srand(time(NULL));
        return rand() % (x+1);
    }
    Code:
    #include <stdio.h>
    #include "head.h"
    int main()
    {
        printf("%d\n", rando(18));
        return 0;
    }
    HACKERS MANIFESTO (NOTE MOST WAS CUT OFF) (PEOPLE SAID IT WAS TOO LONG)
    This is our world now... the world of the electron and the switch, the beauty of the baud.
    · We make use of a service already existing withoutpaying for what could be dirt-cheap if it wasn't run by profiteering gluttons, and you call us criminals.
    · We explore... and you call us criminals.
    · We seek after knowledge... and you call us criminals.
    · We exist without skin color, without nationality, without religious bias... and you call us criminals.
    · You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it's for our own good, yet we're the criminals.

    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.

    I am a hacker, and this is my manifesto. You may stop this individual,but you can't stop us all... after all, we're all alike.
    +++The Mentor+++

  2. #2
    Registered User samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Newport
    Posts
    382
    What, your crime is generating and displaying random numbers between 0 and 18? Jesus, bring in the tear gas and SWAT team...
    Current Setup: Win 10 with Code::Blocks 17.12 (GNU GCC)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lesson #3 - Math
    By oval in forum C# Programming
    Replies: 2
    Last Post: 04-27-2006, 08:16 AM
  2. Another brain block... Random Numbers
    By DanFraser in forum C# Programming
    Replies: 2
    Last Post: 01-23-2005, 05:51 PM
  3. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM
  4. Replies: 25
    Last Post: 10-28-2001, 01:08 PM