Results 1 to 16 of 16

Thread: C++ ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User martos1's Avatar
    Join Date: Nov:2010
    Location: Sofiq
    Posts: 95

    C++ ?


    , . , .

    .. 2( , ). ... ( )

    ..2 C++

  2. #2
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , , .

    , 4. 4 , . , .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  3. #3
    Registered User martos1's Avatar
    Join Date: Nov:2010
    Location: Sofiq
    Posts: 95
    Quote Originally Posted by Bombera View Post
    , , .

    , 4. 4 , . , .

    2 0 2 0 ( ) , 50 2 25 50 .. ?
    Last edited by martos1; 14th December 2010 at 21:07.

  4. #4
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    - , . , .
    18 , 16 . , 18, 16.
    Bombera , -. ,

  5. #5
    Registered User martos1's Avatar
    Join Date: Nov:2010
    Location: Sofiq
    Posts: 95


    Code:
    if(a[i][j]>0&&a[i][j]/2%2!=0)
    2 2 ( )
    18/2=9 9%2=1
    20/2=10 10%2=0

  6. #6
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    19, ?

  7. #7
    Registered User martos1's Avatar
    Join Date: Nov:2010
    Location: Sofiq
    Posts: 95
    int .
    19/2=9 9%2=1
    9,5

    : 21
    Last edited by martos1; 14th December 2010 at 22:05.

  8. #8
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    Bombera, 4 . 47 4, . , - . , .

    C - . , ...
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  9. #9
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    , 4 - 100, ?
    , , .
    :
    4. - .
    ( , )
    , . - .
    - - .
    (%) - 0(false) - (true).
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  10. #10
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    . :
    Code:
    if (a[i][j] & 3 == 2) printf("%d\n", a[i][j]);
    C/C++
    Last edited by icaci; 15th December 2010 at 00:24. Reason:
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  11. #11
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    ! "== 2" , .
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  12. #12
    Registered User martos1's Avatar
    Join Date: Nov:2010
    Location: Sofiq
    Posts: 95




    Code:
    #include <iostream.h>
    int main()
    {
    int a[2][3],i,j;
    for(i=0;i<2;i++)
    for(j=0;j<3;j++)
    {
    cout<<"a["<<i<<"]["<<j<<"]=";
    cin>>a[i][j];
    }
    cout<<"Izvejdane na udvoenite nechetni:"<<endl;
    for(i=0;i<2;i++)
    for(j=0;j<3;j++)
    if(a[i][j]>0&&a[i][j]%2==0&&a[i][j]/2%2!=0)
    cout<<"a["<<i<<"]["<<j<<"]="<<a[i][j]<<endl;
        return 0;
    }

  13. #13
    Registered User
    Join Date: Aug:2008
    Location: Varna
    Posts: 291
    2 .

  14. #14
    Deleted User 4eRNoBiL's Avatar
    Join Date: Oct:2005
    Location:
    Posts: 739
    Quote Originally Posted by Bombera
    ...
    , . , . ...

    - , icaci , 4, 2, 2. 2 4. - "".
    Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19

  15. #15
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    @martos1,
    Code:
    a[i][j] > 0
    - 1 , . , ,
    Code:
    if (a[i][j] & 3 == 2)
    Code:
    if (a[i][j] % 4 == 2)
    4eRNoBiL. , - .

    2? , 1 , 2 0 , ...10, 2. 2k+1, k , 2 4k+2, , 4 2. , , .
    Last edited by icaci; 15th December 2010 at 22:55.
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  16. #16
    Registered User martos1's Avatar
    Join Date: Nov:2010
    Location: Sofiq
    Posts: 95
    Quote Originally Posted by icaci View Post
    @martos1,
    Code:
    a[i][j] > 0
    - 1 , . , ,
    Code:
    if (a[i][j] & 3 == 2)
    Code:
    if (a[i][j] % 4 == 2)
    4eRNoBiL. , - .

    2? , 1 , 2 0 , ...10, 2. 2k+1, k , 2 4k+2, , 4 2. , , .
    4
    Code:
    if (a[i][j] % 4 == 2)




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 |