киберпанк и задачка) - ответ)

Discussion in 'Болталка' started by sn0w, 15 Jul 2011.

  1. Ins3t

    Ins3t Харьковчанин

    Joined:
    18 Jul 2009
    Messages:
    939
    Likes Received:
    429
    Reputations:
    139
    MS VC++ 10 говорит 12
     
  2. M_script

    M_script Members of Antichat

    Joined:
    4 Nov 2004
    Messages:
    2,581
    Likes Received:
    1,317
    Reputations:
    1,557
    в BDS2006 11
     
  3. <Cyber-punk>

    <Cyber-punk> Smash the Stack

    Joined:
    1 Oct 2009
    Messages:
    658
    Likes Received:
    315
    Reputations:
    430
    gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
    Говорит 13.

    Код:
    Code:
    #include <stdio.h>
    
    main() {
    int count;
    puts("Please enter a number: ");
    scanf("%d", &count);
    count = ++count + ++count;
    printf("The number is %d \n", count);
    }
    
    лог:
    Code:
     $ gcc -o i++ i++.c 
     $ ./i++ 
    Please enter a number: 
    5
    The number is 13 
    
     
    _________________________
  4. NetAng

    NetAng Member

    Joined:
    29 Dec 2010
    Messages:
    75
    Likes Received:
    12
    Reputations:
    5
    Dev C++
    Code:
    int i=5;
    i++;
    i++;
    i+=i;
    говорит i = 14

    Code:
    int i = 5; i = i+++i;
    cout << i;
    говорит i = 11
     
  5. Shawn1x

    Shawn1x Elder - Старейшина

    Joined:
    24 Aug 2007
    Messages:
    307
    Likes Received:
    538
    Reputations:
    13
    тс ты на чем щяс сидишь?
     
  6. sn0w

    sn0w Статус пользователя:

    Joined:
    26 Jul 2005
    Messages:
    1,023
    Likes Received:
    1,309
    Reputations:
    327
    на стуле
     
  7. Shawn1x

    Shawn1x Elder - Старейшина

    Joined:
    24 Aug 2007
    Messages:
    307
    Likes Received:
    538
    Reputations:
    13
    новое чтоли чето?))
    и как приход?
     
  8. sn0w

    sn0w Статус пользователя:

    Joined:
    26 Jul 2005
    Messages:
    1,023
    Likes Received:
    1,309
    Reputations:
    327
    в приход не хожу ибо не особо рьяный христианин)