Results 1 to 6 of 6

Thread: ++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    jonyshub's Avatar
    Join Date: Dec:2008
    Location: athens
    Posts: 57

    ++

    !
    : 6 . .
    :

    #include <iostream>
    using namespace std;
    //
    #define MAXN 1000
    int a[MAXN][MAXN];

    int main()
    {
    // ,
    bool flag = 0;
    int n, proizv=1, cifra;
    //
    cin >> n;
    //
    for(int i=0; i<n; i++)
    for(int j=0; j<n; j++)
    cin >> a[i][j];
    cin >> cifra;
    //
    //
    for(int i=0; i<n-1; i++)
    {
    for(int j=i; j<n; j++)
    {
    //
    if(a[i][j] == cifra) flag = 1;
    break;
    }
    if(flag) break;
    }
    // , - , -
    if(flag == 1) cout << "Yes!" << endl;
    else cout << "No!" << endl;
    system("pause");
    return 0;
    }
    6 : "int A [6] [6]". . - , - . ? , :
    int [6][6] = { { 1, 2, 3, 4, 5, 6 }, { 7, 8, 9 } };
    "define" , . , "int A [7] [7]". , ...
    !!!
    Last edited by jonyshub; 9th April 2010 at 03:25.

  2. #2
    Mes Que Un Club F3N0M3NA's Avatar
    Join Date: Nov:2008
    Location: Sofia
    Posts: 175
    0, 6. , . - , , . , - , , -. 1 0 , if(flag) break; flag 0 , , 1
    Q9550@4.3GHz | 3D Mark 06 GTX 280 | 3D Mark 06 4870x2 | 3D Mark 06 5850
    Asrock P67 Pro3|Intel Core i7 2600k|A-Data 2X2GB DDR3 @ 1866MHz 8-8-8-24|Sapphire 6850|WD Caviar Black 750GB Sata III 64MB|Coolermaster RealPower M700|Coolermaster HAF 922|Samsung SM P2350|A4Tech X755FS|Logitech Wave Keyboard

  3. #3
    jonyshub's Avatar
    Join Date: Dec:2008
    Location: athens
    Posts: 57
    !
    - . , 2. ! 3- !

    ---------- 09:59 ---------- 09:49 ----------

    ... , , . ))

  4. #4
    XaMaB's Avatar
    Join Date: Nov:2001
    Location:
    Posts: 20,387

    //
    if (a[i][j] == cifra)
    {
    flag = 1;
    break;
    }
    J

    proizv=1.

    , . :
    //
    for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
    {
    cout << "Vyvedete [" << i << ", " << j << "]:";
    cin >> a[i][j];
    }
    cout << "Vyvedete cifra za tyrsene:";
    cin >> cifra;

    define MAXN = 6 ( ) n -

    A : , for(int j=i; j<n; j++) .
    : XaMaB; . 0.42

    In God we Trust (all others must submit a X.509 certificate). , ()

  5. #5
    jonyshub's Avatar
    Join Date: Dec:2008
    Location: athens
    Posts: 57
    !

    ---------- 10:57 ---------- 10:44 ----------

    , , - , - , . .

    ---------- 11:22 ---------- 10:57 ----------

    3 !!! 3 !!!

    ---------- 14:55 ---------- 11:22 ----------

    , !!! . Dev C++
    ...
    Last edited by jonyshub; 9th April 2010 at 11:07.

  6. #6
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    .
    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|

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 |