Results 1 to 16 of 16

Thread: ++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Nov:2010
    Location: LULIN
    Posts: 13

    ++

    , ++ .

    :
    2 ( b), b . (: 110, 124) , 3 120,123,124.
    .
    :

    #include <iostream>
    using namespace std;
    int main()
    {

    int a;
    int b;
    cout<< "Please enter a number: \n";
    cin>> a;
    cout<< "Please enter a number witch is higher than the previous one: \n";
    cin>> b;
    if (a>=b)
    {
    cout<< "ERROR ! \n" "Please enter anoter number: ";
    cin>> b;
    }
    for (int c=a; c<=b; c++) cout<< c << " ";

    system("PAUSE");
    return 0;
    }

  2. #2
    Defender Kaspirtov's Avatar
    Join Date: Jun:2006
    Location: Sf
    Posts: 7,414
    , , ....

    ( : 110, 124 =110 100 = 1, 10 = 1, 1 = 0 b=124 b100 = 1, b10 = 2, b1 = 4)

    ( ), - a (100) - , (b100), , .....
    " , , , , ."

  3. #3
    Registered User
    Join Date: Nov:2007
    Location: +359 2
    Posts: 249
    ?
    .

  4. #4
    Registered User
    Join Date: Nov:2010
    Location: LULIN
    Posts: 13
    Quote Originally Posted by anrieff View Post
    Code:
    #!/usr/bin/python
    
    a, b = map(int, raw_input("a, b: ").split())
    
    print filter(lambda x: all(map(lambda c: str(x).count(c)==1, list(str(x)))), range(a, b+1))
    -,
    ??
    Last edited by qwertyo; 27th November 2010 at 18:41.

  5. #5
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    . - - ? , , , () - ().

    - , .
    , . . , , - .

  6. #6
    Defender Kaspirtov's Avatar
    Join Date: Jun:2006
    Location: Sf
    Posts: 7,414
    Quote Originally Posted by bsb View Post
    .
    ! , , ...

    , , .... . 0 9, - 10 . , , , ... , , :

    Array stotici = {1}
    Array desettici = {1, 2}
    Array edinici = {0, 1, 2, 3}

    1 , .
    " , , , , ."

  7. #7
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    , , . , ? 10 , MAX_LONG 32- long ( MAX_LONG, )? 10*10 ?

  8. #8
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    Code:
    #!/usr/bin/python
    
    a, b = map(int, raw_input("a, b: ").split())
    
    print filter(lambda x: all(map(lambda c: str(x).count(c)==1, list(str(x)))), range(a, b+1))
    -,
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  9. #9
    Defender Kaspirtov's Avatar
    Join Date: Jun:2006
    Location: Sf
    Posts: 7,414
    Quote Originally Posted by bsb View Post
    , , . , ? 10 , MAX_LONG 32- long ( MAX_LONG, )? 10*10 ?
    bsb, - , ? N , anrieff ... regional expressions, ako , , ... C#....

    - . - . 25, => , => ! a b 2, 3, 5, ... N ... , , .
    " , , , , ."

  10. #10
    Registered User
    Join Date: Dec:2007
    Location: Razgrad
    Posts: 93
    :

    #include <iostream>
    #include <cstdlib>
    using namespace std;
    int main ()
    {
    int a,b;

    begin:
    cout<<"4islo a:";
    cin>>a;

    cout<<"4islo b:";
    cin>>b;

    if (a>b)
    {
    cout<<"molq 4islata da sa a<b"<<endl;
    goto begin;
    }

    while (a<b)
    {
    cout<<"mejdinite im 4isla:"<<a++<<endl;
    }





    system ("pause");
    return 0;
    }
    CPUintel E5200@4.00ghz idle-1.40 Load-1.38@bios1.43V|MoBo-Asus P5KC pencil-mod|RAM A-DATA 2x2GB 800Mhz@866Mhz 1.80V
    HDD-SAMSUNG 500GB SATA2 7500rpm,16MB
    GPU-7790 Sapphire 1024MB.

  11. #11
    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|

  12. #12
    Registered User
    Join Date: Aug:2008
    Location: Varna
    Posts: 291
    / . /

    . - .

  13. #13
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    , . - . - , .
    . ( ) , - .

    P.S. , C.
    Last edited by bsb; 28th November 2010 at 14:19.

  14. #14
    Defender Kaspirtov's Avatar
    Join Date: Jun:2006
    Location: Sf
    Posts: 7,414
    Quote Originally Posted by bsb View Post
    ( ) , - .
    , - . - ...

    ( 10- ) - , , , .
    " , , , , ."

  15. #15
    Registered User
    Join Date: Sep:2009
    Location: Shumen
    Posts: 12
    #include <iostream>
    using namespace std;

    int c[10],solve[100];

    int is_number (int n)
    {
    int p,i;
    for(i=0; i<10; i++)
    c[i]=0;
    while (n)
    {
    p=n%10;
    if (c[p])
    return 0;
    c[p]=1;
    n/=10;
    }
    return 1;
    }
    int main ()
    {
    int a,b;
    cout<<"a=";
    cin>>a;
    cout<<"b=";
    cin>>b;

    if (a>=b)
    {
    cout<<"Error!"<<endl;
    return 0;
    }
    int j=0,i;
    for (i=a; i<=b; i++)
    if (is_number(i))
    solve[j++]=i;
    for(i=0; i<j; i++)
    cout<<solve[i]<<endl;
    return 0;
    }
    , .

    ---------- 17:28 ---------- 15:50 ----------

    #include <iostream>
    #include <cstdlib>
    using namespace std;

    int c[10];

    int is_number (int n)
    {
    int i;
    for(i=0; i<10; i++)
    c[i]=0;
    while (n)
    {
    i=n%10;
    if (c[i])
    return 0;
    c[i]=1;
    n/=10;
    }
    return 1;
    }
    int main ()
    {
    int a,b;
    cout<<"a=";
    cin>>a;
    cout<<"b=";
    cin>>b;

    if (a>=b)
    {
    cout<<"Error!"<<endl;
    return 0;
    }
    int i;
    for (i=a; i<=b; i++)
    if (is_number(i))
    cout<<i<<endl;
    system("pause");
    return 0;
    }

  16. #16
    Registered User
    Join Date: Nov:2010
    Location: LULIN
    Posts: 13
    Quote Originally Posted by firojj View Post
    #include <iostream>
    using namespace std;

    int c[10],solve[100];

    int is_number (int n)
    {
    int p,i;
    for(i=0; i<10; i++)
    c[i]=0;
    while (n)
    {
    p=n%10;
    if (c[p])
    return 0;
    c[p]=1;
    n/=10;
    }
    return 1;
    }
    int main ()
    {
    int a,b;
    cout<<"a=";
    cin>>a;
    cout<<"b=";
    cin>>b;

    if (a>=b)
    {
    cout<<"Error!"<<endl;
    return 0;
    }
    int j=0,i;
    for (i=a; i<=b; i++)
    if (is_number(i))
    solve[j++]=i;
    for(i=0; i<j; i++)
    cout<<solve[i]<<endl;
    return 0;
    }
    , .

    ---------- 17:28 ---------- 15:50 ----------

    #include <iostream>
    #include <cstdlib>
    using namespace std;

    int c[10];

    int is_number (int n)
    {
    int i;
    for(i=0; i<10; i++)
    c[i]=0;
    while (n)
    {
    i=n%10;
    if (c[i])
    return 0;
    c[i]=1;
    n/=10;
    }
    return 1;
    }
    int main ()
    {
    int a,b;
    cout<<"a=";
    cin>>a;
    cout<<"b=";
    cin>>b;

    if (a>=b)
    {
    cout<<"Error!"<<endl;
    return 0;
    }
    int i;
    for (i=a; i<=b; i++)
    if (is_number(i))
    cout<<i<<endl;
    system("pause");
    return 0;
    }

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 |