Results 1 to 25 of 30

Thread: C++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Black Hawk's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 871

    C++

    , C++, , ( B) - .

    : , :
    = 911
    B = 86

    : - A B

    , :/
    ASRock P67 Extreme4 / i5-2500K / 32GB Geil Evo Leggera DDR3-1866 / MSI GTX 970 / Samsung 840 Evo 250GB / 1TB Samsung SpinPoint F3 / 60GB OCZ Vertex 2 / Corsair HX850i / Corsair 730GT Full Tower / Arctic Freezer 7 Pro Ver2 / LG 34UC79G-B 34"

  2. #2
    Registered User
    Join Date: Jul:2004
    Location:
    Posts: 621

  3. #3
    Tatul CodeWarrior's Avatar
    Join Date: Dec:2002
    Location: Sofia
    Posts: 1,707
    " C++" - , . . .

  4. #4
    Registered User Black Hawk's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 871
    Quote Originally Posted by CodeWarrior
    " C++" - , . . .
    2 . , 1 C++, - ( , , ). , 2 :

    Code:
    #include <iostream.h>
    void main()
    { int i,j,k,a,b;
    cout <<"Vuvedi stoinost na A:\n";
    cin>>a;
    cout <<"Vuvedi stoinost na B:\n";
    cin>>b;
    i=a;j=b;
    again:
    k=i % j;
    if(k==0)goto stop;
    else
    {i=j;j=k;
     goto again;
    }
    stop: cout <<"Nai-golemiqt obsht delitel na "<<a<<" i "<<b<<" e "<<j<<endl;
    	  i=a;j=b;
    	do
    	{
    		k=i%j;
    		if (k==0)break;
    		i=j;j=k;
    	}while (true);
    }
    - =050 ( 0 ), 50, 40..
    ASRock P67 Extreme4 / i5-2500K / 32GB Geil Evo Leggera DDR3-1866 / MSI GTX 970 / Samsung 840 Evo 250GB / 1TB Samsung SpinPoint F3 / 60GB OCZ Vertex 2 / Corsair HX850i / Corsair 730GT Full Tower / Arctic Freezer 7 Pro Ver2 / LG 34UC79G-B 34"

  5. #5
    Registered User singularity's Avatar
    Join Date: Apr:2003
    Location:
    Posts: 3,382
    .
    Last edited by singularity; 12th April 2007 at 13:54. Reason:
    ignore list:Java,velio,jaredharet,gochev.george,Nit rogenium
    Quis custodiet ipsos custodes?

  6. #6
    Registered User Annihilator's Avatar
    Join Date: Jun:2004
    Location: Sofia
    Posts: 1,316
    , , ... .
    , , -, , ?


    Code:
     
    #include<stdio.h>
    
    
    int gcd(int a, int b) {
      if (b == 0)
        return a;
      else
        return gcd(b, a % b);
    }
    
    int main(){
    int x,y,result;
    printf("Chislo1? ");
    scanf("%i",&x);
    printf("Chislo2? ");
    scanf("%i",&y);
    printf("rezultatyt e %i \n",gcd(x,y));
    return 0;
    }

    , 1 ?

    , ? , lvalue?
    cin/cout /
    Last edited by Annihilator; 16th October 2005 at 16:47.

  7. #7
    Registered User
    Join Date: Jul:2004
    Location:
    Posts: 621
    , goto
    , . goto- ( 8-15, ) while-, - main().

    , "050" 40?! , .. :

    Code:
    int a = 050;
    , .


    .. Annihilator, - '&'
    ..2. , .
    ..3. /off : lvalue ( ) , ... ...
    Last edited by DimKo; 16th October 2005 at 16:57.

  8. #8
    Registered User vegasis's Avatar
    Join Date: Jun:2005
    Location:
    Posts: 1,156
    Quote Originally Posted by singularity
    goto C, do...while() .
    . , win2k ( -) goto-.

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 |