Results 1 to 21 of 21

Thread: C++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86

    ++

    . . . ++, ... .
    :
    , , 2000.
    :
    #include <iostream.h>
    struct izp
    {char ime[20],pi;
    int D,M,G;
    char klip[10],pk;}
    izp s[20];
    int i,n;
    main()
    {do
    {cout<<"\n Broi izpulnitelq";
    cin>>n;}
    while(n<1||n>20);
    for(i=0;i<n;i++)
    {s[i].pi=s[i].ime[0];
    cout<<"\n Ime na izpulnitelq";
    cin>>s[i].pi;
    do
    {cout<<"\n Vuvedi godina";
    cin>>s[i].G;}
    while(s[i].G<1950||s[i].G>1970);
    do
    {cout<<"\n Vuvedi mesec";
    cin>>s[i].M;}
    while(s[i].M<1||s[i].M>12);
    do
    {cout<<"\n Vuvedi den";
    cin>>s[i].D;}
    while(s[i].D<1||s[i].D>31);
    cout<<"\n klip";
    s[i].pk=s[i].klip[0];
    cin>>s[i].pk;
    if(s[i].G>2000)
    cout<<"\n"<<s[i].pk;}
    return 0;}

    1 , . , 3 ... ... ? . 17.05.04.
    !
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  2. #2
    Mmmm, sessy!
    Join Date: May:2003
    Location:
    Posts: 696
    , ,

    {
    do
    {
    cout<<"\n Broi izpulnitelq";
    cin>>n;
    }
    while(n<1||n>20);

    for(i=0;i<n;i++)
    {
    s[i].pi=s[i].ime[0];
    cout<<"\n Ime na izpulnitelq";
    cin>>s[i].pi;
    do
    {
    cout<<"\n Vuvedi godina";
    cin>>s[i].G;
    }
    while(s[i].G<1950||s[i].G>1970);

    do
    {
    cout<<"\n Vuvedi mesec";
    cin>>s[i].M;
    }
    while(s[i].M<1||s[i].M>12);

    do
    {
    cout<<"\n Vuvedi den";
    cin>>s[i].D;
    }
    while(s[i].D<1||s[i].D>31);

    cout<<"\n klip";
    s[i].pk=s[i].klip[0];
    cin>>s[i].pk;
    if(s[i].G>2000)
    cout<<"\n"<<s[i].pk;
    }
    return 0;
    }


    :
    for(i=0;i<n;i++)
    if(s[i].G>2000)
    cout<<"\n"<<s[i].pk;

    1950 1970. 2000... .

  3. #3
    singular corporation SingulusCorpora's Avatar
    Join Date: Nov:2003
    Location: Concrete jungle
    Posts: 579

    Re: ++

    Originally posted by wenzdy
    . . . ++, ... .
    :
    , , 2000.
    :
    #include <iostream.h>
    struct izp
    {char ime[20],pi;
    int D,M,G;
    char klip[10],pk;}
    izp s[20];
    int i,n;
    main()
    {do
    {cout<<"\n Broi izpulnitelq";
    cin>>n;}
    while(n<1||n>20);
    for(i=0;i<n;i++)
    {s[i].pi=s[i].ime[0];
    cout<<"\n Ime na izpulnitelq";
    cin>>s[i].pi;
    do
    {cout<<"\n Vuvedi godina";
    cin>>s[i].G;}
    while(s[i].G<1950||s[i].G>1970);
    do
    {cout<<"\n Vuvedi mesec";
    cin>>s[i].M;}
    while(s[i].M<1||s[i].M>12);
    do
    {cout<<"\n Vuvedi den";
    cin>>s[i].D;}
    while(s[i].D<1||s[i].D>31);
    cout<<"\n klip";
    s[i].pk=s[i].klip[0];
    cin>>s[i].pk;
    if(s[i].G>2000)
    cout<<"\n"<<s[i].pk;}
    return 0;}

    1 , . , 3 ... ... ? . 17.05.04.
    !

    :
    char ime[20],pi;

    pi character, cin, , , - member- G, 1950 1970, do...while ....

    ........
    In the long run, we re all dead

  4. #4
    Fighting with demons gkirilov's Avatar
    Join Date: Jun:2003
    Location: Asgard
    Posts: 1,222
    [bg]malyk oftopik .... [/bg] SingulusCorpora [bg], kakwo e twa ne]o deto koda w signaturata ti generira?[/bg]

  5. #5
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86
    ... ... .... ... - , .

    Last edited by wenzdy; 15th May 2004 at 17:08.
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  6. #6
    singular corporation SingulusCorpora's Avatar
    Join Date: Nov:2003
    Location: Concrete jungle
    Posts: 579

    ...

    Originally posted by gkirilov
    [bg]malyk oftopik .... [/bg] SingulusCorpora [bg], kakwo e twa ne]o deto koda w signaturata ti generira?[/bg]
    http://hardwarebg.com/forum/showthre...threadid=29755
    In the long run, we re all dead

  7. #7
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86

    Re: Re: ++

    Originally posted by SingulusCorpora
    :
    char ime[20],pi;

    pi character, cin, , , - member- G, 1950 1970, do...while ....

    ........
    SingulusCorpora
    int D,M,G te 2 a ?
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  8. #8
    Whimmy Wham Wham Wozzle! lini's Avatar
    Join Date: Dec:2001
    Location: Wormulon
    Posts: 2,446
    "CODE" . .
    Code:
    #include <iostream.h>
    struct izp
    {
    	char ime[20],pi;
    	int D,M,G;
    	char klip[10],pk;
    }
    izp s[20];
    int i,n;
    main()
    {
    	do
    	{
    		cout<<"\n Broi izpulnitelq";
    		cin>>n;
    	}
    	while(n<1||n>20);
    	for(i=0;i<n;i++)
    	{
    		s[i].pi=s[i].ime[0];
    		cout<<"\n Ime na izpulnitelq";
    		cin>>s[i].pi;
    		do
    		{
    			cout<<"\n Vuvedi godina";
    			cin>>s[i].G;
    		}
    		while(s[i].G<1950||s[i].G>1970);
    		do
    		{
    			cout<<"\n Vuvedi mesec";
    			cin>>s[i].M;
    		}
    		while(s[i].M<1||s[i].M>12);
    		do
    		{
    			cout<<"\n Vuvedi den";
    			cin>>s[i].D;
    		}
    		while(s[i].D<1||s[i].D>31);
    		cout<<"\n klip";
    		s[i].pk=s[i].klip[0];
    		cin>>s[i].pk;
    		if(s[i].G>2000)
    		cout<<"\n"<<s[i].pk;
    	}
    	return 0;
    }

    99 little bugs in the code, 99 little bugs...
    Knock one down, and test it again, 100 little bugs in the cod...

  9. #9
    singular corporation SingulusCorpora's Avatar
    Join Date: Nov:2003
    Location: Concrete jungle
    Posts: 579

    Re: Re: Re: ++

    #include <iostream.h>
    struct izp
    {
    char ime[20],pi;
    int D,M,G;
    char klip[10],pk;
    };
    izp s[20];
    int i,n;
    main()
    {
    do
    {
    cout<<"\n Broi izpulnitelq";
    cin>>n;
    }
    while(n<1||n>20);
    for(i=0;i<n;i++)
    {
    s[i].pi=s[i].ime[0];
    cout<<"\n Ime na izpulnitelq";
    cin>>s[i].ime;
    //
    do
    {
    cout<<"\n Vuvedi godina";
    cin>>s[i].G;
    }
    while(s[i].G<1950||s[i].G>1970);
    //
    do
    {
    cout<<"\n Vuvedi mesec";
    cin>>s[i].M;
    }
    while(s[i].M<1||s[i].M>12);
    //
    do
    {
    cout<<"\n Vuvedi den";
    cin>>s[i].D;
    }
    while(s[i].D<1||s[i].D>31);
    //
    cout<<"\n klip";
    s[i].pk=s[i].klip[0];
    cin>>s[i].klip;
    if(s[i].G>2000)
    cout<<"\n"<<s[i].klip;
    }

    return 0;
    }

    .
    In the long run, we re all dead

  10. #10
    batdin's Avatar
    Join Date: Dec:2003
    Location: Bourgas,BG
    Posts: 400
    , .
    / ?
    , .
    .

    #include <iostream.h>
    struct izp
    {
    char ime[20];
    int D,M,G;
    char klip[10];
    };
    izp s[20];
    int i,n;
    main()
    {
    do
    {
    cout<<"\n Broi izpulnitelq ";
    cin>>n;
    }
    while(n<1||n>20);
    for(i=0;i<n;i++)
    {
    cout<<"\n Ime na izpulnitelq ";
    cin>>s[i].ime;
    do
    {
    cout<<"\n Vuvedi godina ";
    cin>>s[i].G;
    }
    while(s[i].G<1950||s[i].G>2004);
    do
    {cout<<"\n Vuvedi mesec ";
    cin>>s[i].M;}
    while(s[i].M<1||s[i].M>12);
    do
    {cout<<"\n Vuvedi den ";
    cin>>s[i].D;}
    while(s[i].D<1||s[i].D>31);
    cout<<"\n klip ";
    cin>>s[i].klip;
    }
    for(i=0;i<n;i++)
    {
    if(s[i].G>2000)
    cout<<"\n"<<s[i].klip;
    }
    return 0;
    }
    , .

  11. #11
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86
    ...
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  12. #12
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86
    ... , , 2000. ...... 1950 1970. , ... ?
    SingulusCorpora ...
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  13. #13
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86
    - ... . !!!
    :
    #include <iostream.h>
    struct izp
    {
    char ime[20],pi;
    int D,M,G,K;
    char klip[10],pk;
    };
    izp s[20];
    int i,n;
    main()
    {
    do
    {
    cout<<"\n Broi izpulnitelq";
    cin>>n;
    }
    while(n<1||n>20);
    for(i=0;i<n;i++)
    {
    s[i].pi=s[i].ime[0];
    cout<<"\n Ime na izpulnitelq";
    cin>>s[i].ime;
    //
    do
    {
    cout<<"\n Vuvedi godina";
    cin>>s[i].G;
    }
    while(s[i].G<1950||s[i].G>1970);
    //
    do
    {
    cout<<"\n Vuvedi mesec";
    cin>>s[i].M;
    }
    while(s[i].M<1||s[i].M>12);
    //
    do
    {
    cout<<"\n Vuvedi den";
    cin>>s[i].D;
    }
    while(s[i].D<1||s[i].D>31);
    //
    cout<<"\n klip";
    s[i].pk=s[i].klip[0];
    cin>>s[i].klip;
    do
    {
    cout<<"\n Vuvedi godina";
    cin>>s[i].K;
    }
    while(s[i].K<2000||s[i].K>2003);
    if(s[i].K>2000)
    cout<<"\n"<<s[i].klip;
    }

    return 0;
    }
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  14. #14
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86

    C++

    . , ... ... . , .
    :
    .
    1234, 12. 4 !
    !
    Last edited by wenzdy; 15th May 2004 at 23:16.
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  15. #15
    Registered User Mitko744's Avatar
    Join Date: Sep:2002
    Posts: 343
    3 4 ?

  16. #16
    wenzdy's Avatar
    Join Date: May:2004
    Location: .;-)
    Posts: 86
    3- 4- .
    : Destiny flying high above all. Destiny can't replace my life scary shadows of my past are alive. Destiny who cares as it turns around and I know that it descends with a smile.

  17. #17
    Registered User Smoky's Avatar
    Join Date: Aug:2001
    Location: BG
    Posts: 1,339
    Code:
    #include <stdio.h>
    #include <iostream.h>
    
    int x,i;
    char buffer[20];
    main()
    {
       cin >>x;
       itoa(x, buffer);
    
      for(i=0;buffer[i] !='\0';i++)
        {
            if((i != 3) || (i !=4))
               cout << buffer[i]
         }
       cout<<endl;
    }
    ...

  18. #18
    Mmmm, sessy!
    Join Date: May:2003
    Location:
    Posts: 696
    Originally posted by Smoky
    Code:
    #include <stdio.h>
    #include <iostream.h>
    
    int x,i;
    char buffer[20];
    main()
    {
       cin >>x;
       itoa(x, buffer);
    
      for(i=0;buffer[i] !='\0';i++)
        {
            if((i != 3) || (i !=4))
               cout << buffer[i]
         }
       cout<<endl;
    }
    ...
    , , ?
    ...

    - :
    for(int i=0; i<strlen(buffer); i++), .

    , .

  19. #19
    Registered User Smoky's Avatar
    Join Date: Aug:2001
    Location: BG
    Posts: 1,339
    Code:
            if((i != 2) || (i !=3))

    12.00 Silent Boost, debug
    strlen() - ,
    , , , 5 -

  20. #20
    Registered User monster's Avatar
    Join Date: Feb:2003
    Location:
    Posts: 941
    -
    Code:
    if((i != 2) && (i !=3))
    , :
    Code:
    { 
    	char s[1000]; 
    	do { 
    		cout << "Enter a number >= 1000\n"; 
    		cin >> s; 
    	} while(atoi(s) < 1000);
    
    	cout << s[0]; 
    	cout << s[1]; 
    	if (strlen(s) > 4) 
    		cout << &s[4]; 
    }
    Last edited by monster; 17th May 2004 at 00:38.

  21. #21
    Registered User mouser's Avatar
    Join Date: Sep:2002
    Location: Pasadena, CA
    Posts: 304
    wenzdy:
    1. , . . , , .
    2. main(). - , . - - .

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 |