Results 1 to 13 of 13

Thread: C++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User ender's Avatar
    Join Date: Mar:2005
    Location: sofiq
    Posts: 19

    Thumbs down C++

    ++ 40 - - . , .


    #include <iostream>
    int main()
    {
    int a[40],min,max;
    for (i=0; i<=39; i++)
    {
    cout<<"Vavedete a["<<i<<"]=";
    cin>>a[i];
    }
    int min=a[a^0];
    if (min > a[i]);
    min=a[i];
    cout<< min;
    int max=a[a^0];
    if(max<a[i]);
    max=a[i]
    cout<<max;
    }

  2. #2
    1336.5 artanis's Avatar
    Join Date: Dec:2004
    Location:
    Posts: 184
    Quote Originally Posted by ender View Post
    ++ 40 - - . , .
    Code:
    #include <iostream>
    int main()
    {
    int a[40],min,max;
    cout<<"Vavedete a[0]=";
    cin>>a[0];
    min = max = a[0];
    for (i=1; i<40; i++)
    {
    cout<<"Vavedete a["<<i<<"]=";
    cin>>a[i];
    if (min > a[i])
       min=a[i];
    if(max<a[i])
       max=a[i];
    }
    cout<< "min: " << min;
    cout<< "max: " << max;
    }
    42;

  3. #3
    Registered User Smoky's Avatar
    Join Date: Aug:2001
    Location: BG
    Posts: 1,339
    , STL, () :
    Code:
    #include <iostream>
    #include <vector>
    #include <algorithm>
    int main()
    {
      std::vector<int> values;
      for (i=0; i<40; ++i)
      {
        std::cout<<std::endl<<"Molya vavedete a["<<i<<"]:";
        int tmpVal = 0;
        std::cin>>tmpVal;
        values.push_back(tmpVal)
      }
      std::cout<< "min: " << std::min_element(values.begin(), values.end());
      std::cout<< "max: " << std::max_element(values.begin(), values.end());
    }

  4. #4
    1336.5 artanis's Avatar
    Join Date: Dec:2004
    Location:
    Posts: 184
    - ++ STL. , , , ( ).
    42;

  5. #5
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    Quote Originally Posted by artanis View Post
    - ++ STL. , , , ( ).
    , , " , - copy/paste ".

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

  6. #6
    Registered User rumen_33's Avatar
    Join Date: May:2007
    Location: Canada
    Posts: 137
    [QUOTE=anrieff;1190950] , , " , - copy/paste ".

    Pesho - [/QU
    OTE]
    ,

  7. #7
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  8. #8
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    Quote Originally Posted by icaci View Post


  9. #9
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47
    , STL, ?

  10. #10
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    STL C++, - C++ . - ( ), , (vector), (priority_queue), (list), (map set). : (sort), (next_permutation), (random_shuffle), (binary_search). (string), (fstream, stringstream) . .

    , // - .. , , ..

    :

    :
    1.
    2.
    3. .

    . , , :

    1.1 1.20 , 44* 12' 15'' 45''' 48* 0' 15'' 38''' ... ... .
    1.2 "" , . ( - )
    2.1. , .... ... .
    2.2. 480 ""
    3..

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

  11. #11
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    STL - Standard Template Library - C++. (, , , ..), / () (, ..)
    - . , . - BASIC, Pascal C, :
    Code:
    double _ ( v1,  v2)
    
      : double
      i: integer
    
       i := 1  (v1)
         :=  + v1[i]*v2[i]
       
    
    , "", "", "", "", "", "" .. , , .

    anrieff
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  12. #12
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    Quote Originally Posted by icaci View Post
    anrieff


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

  13. #13
    ++/# php_bg's Avatar
    Join Date: Jun:2007
    Location: Here
    Posts: 47

    ( - ...) ...
    STL- ...

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 |