Results 1 to 6 of 6

Thread: ,

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Jun:2005
    Location: Sofia
    Posts: 5

    ,

    , . ...
    , , ( ) 8 .
    ...


    #include <stdio.h>

    int main()
    {
    int a, i, ar[8];

    for(i = 0; i < 8; i++)
    ar[i] = 0;

    scanf("%d", &a);

    for(i = 0; a != 0; i++)
    {
    ar[i] = a % 2;
    a = (int)(a / 2);
    }

    for(i = 7; i >= 0; i--)
    printf(" %d", ar[i]);

    return 0;
    }

  2. #2
    Registered User entium's Avatar
    Join Date: May:2003
    Location:
    Posts: 1,426
    EP43-DS3|E5200@3.33|ASUS EN9800GT HB /HTDI/ 512MB|2X2GB 800MHZ CL5 A-DATA|WD2500JB|NEC 4750A|BELINEA 1980S2

  3. #3
    🆃🅾🆂🆂 🆃🅷🅴 🅳🅸🅲🅴 Salinski's Avatar
    Join Date: Sep:2006
    Location: /mnt
    Posts: 1,103
    ... " ...".

  4. #4
    Registered User
    Join Date: Jun:2005
    Location: Sofia
    Posts: 5
    10--->2 :
    @ http://www.engin.umd.umich.edu/CIS/c...pp/binary.html
    ----------
    #include <iostream.h>

    void binary(int);

    void main(void) {
    int number;

    cout << "Molq vyvedete polojitelno cqlo chislo: ";
    cin >> number;
    if (number < 0)
    cout << "Ne e polojitelno cqlo chislo.\n";
    else {
    cout << number << "Prekodirano v dvoichna brojna sistema e: ";
    binary(number);
    cout << endl;
    }
    }

    void binary(int number) {
    int remainder;

    if(number <= 1) {
    cout << number;
    return;
    }

    remainder = number%2;
    binary(number >> 1);
    cout << remainder;
    }


    @Salinski: , , . . , , , ... .
    @entium: , , .

  5. #5
    🆃🅾🆂🆂 🆃🅷🅴 🅳🅸🅲🅴 Salinski's Avatar
    Join Date: Sep:2006
    Location: /mnt
    Posts: 1,103
    Quote Originally Posted by emanuel40 View Post
    @Salinski: , , . . , , , ... .
    @entium: , , .
    ... 5 " ..." . , . .

  6. #6
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    @emanuel40, .

    , . (.. 3.1415 3 0.1415).
    () , ".", 256, . 8 . 16 , 65536.

    , 11 ( , , , ).

    !
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |