Had my first computer science lecture today..

Discussion in 'BlackHat Lounge' started by Designerdude13, Sep 10, 2012.

  1. Designerdude13

    Designerdude13 Power Member

    Nov 22, 2010
    Likes Received:
    It's a beginners course.
    I'm still confused on WHAT THE HELL bool and double and int does?
    Can someone help me?
    Integer division and mod....blah blah
  2. DarkPixel

    DarkPixel Jr. VIP Jr. VIP

    Oct 4, 2011
    Likes Received:
    Home Page:
    Bool, Double and Int are variables.

    Booleans can be 1,0,true,false. 1=true, 0=false
    Integers are numbers like 1-5-15-2014
    Doubles if I remember it right 1,5-25,42-62,35-14186,25

    Integer division is simply a division but the result should be integer.
    Mod is again a division, but mod returns, what's left from the DIV division.(I think)

    Sorry for my english, you should search google for stuff like that.
    • Thanks Thanks x 1
  3. MrBeastsOnToast

    MrBeastsOnToast Jr. VIP Jr. VIP

    Dec 17, 2011
    Likes Received:
    The Internetz
    at a very basic level i think this is what your looking to know. There are some advanced(ish) technical exceptions to what im saying in this post. But for your first lecture the info below will be what you are trying to understand.

    Bool, Int and Double are types of variables.

    A variable is a segment of memory assigned by the system to store some type of data at run time.

    For reasons unknown to me, systems like to know what kind of data is going to be stored in a variable.
    If you use an int variable - the system knows that the data in that variable is an integer
    if you use a double variable the system knows that its going to be a double in that variable
    if you use a boolean the system knows its going to be a boolean value in the variable - (a boolean (bool) is a variable that has two values, either true or false)
    • Thanks Thanks x 1